Php – Trouble installing xhprof

lamppeclPHP

I'm currently trying to install the xhprof (PECL) extension onto my Mediatemple gridserver. I'm having a bit of a time of it since write restrictions won't allow the PECL installer to work. I've done the following:

mkdir /home/#####/data/lib/xhprof-0.9.2
wget http://pecl.php.net/get/xhprof-0.9.2.tgz
uncompress into /home/#####/data/lib/xhprof-0.9.2
cd ./xhprof-0.9.2/extension/
phpize
./configure 
make
make install
make test
mkdir /var/tmp/xhprof

The compiler seems to run fine. make test returns 8success, 0 failure.

then I'm adding the following to my php.ini (at /home/#####/etc):

[xhprof] extension=xhprof.so
xhprof.output_dir="/var/tmp/xhprof"

Note that I don't have access to the global php.ini file.

At this point, xhprof still doesn't work (ie – a call to xhprof_enable() returns a fatal error – undefined function)

Other specs:
PHP Version 5.2.14
Apache/2.0.54
My questiosn:
What is the proper php-config path?
How do I tell php to parse my additional php.ini file?

Am I doing anything else wrong?

Thanks in advance for any help..

Best Answer

There is a nice guide on mediatemple wiki for setting up xhprof

Mediatemple has a hosting specific php.ini which you can use to setup.