I'm trying to configure and use XHProf. I've managed to get it installed and running on my server but I get a blank page when I try to access localhost/xhprof_html

This is the general post I've been following:



I'm running a fresh Ubuntu Server 13.04. Its inside an VirtualBox

(Server set-up)

I installed xhprof using:

 sudo pecl install -f xhprof

I then added the following lines to my php.ini.


I then rebooted apache and tested that xhprof is running using php -m. It is.

I then moved xhprof_html from /usr/share/php/ to /var/www/

But when I open localhost/xhprof_html/index.php I get a blank white screen.

I had something similar when I first installed drupal and the following command fixed it:

$ sudo chown -R www-data /var/www/drupal/

However I can't it to work this time.

What have I done wrong?

  • What do your logs say? (in /var/log/apache, especially the error.log) – Calimo Oct 10 '13 at 12:31
  • @Calimo Think I fixed it. Cheers though! – Dominic Woodman Oct 10 '13 at 12:50

Two things seemed to fix this.

Number One:

Don't move xhprof_html. This seems to break it. Instead leave it where it is, or make a symlink from /var/www/xhprof_html to /usr/share/php/xhprof_html.

Number 2

Make sure you're testing for it correctly.

Test 1:

php -m

It might show up there.

But it sometimes doesn't. The other way to check is to add a php file with


to /var/www and run it. Search for xhprof and if you find it, it's running. I didn't try the second one and was only using drupal integration to test for it, which wasn't working, so I missed that it was working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.