Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Problem

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:

http://www.grasmash.com/article/installing-xhprof-drupal#view

Set-Up

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.

extension=xhprof.so
xhprof.output_dir="/tmp/xhprof"

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?

share|improve this question
    
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

1 Answer 1

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

phpinfo();

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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