I have installed xhprof on debian 7 using php5-xhprof
This created a file /etc/php5/fpm/conf.d/20-xhprof.ini
In that ini file I added xhprof.output_dir="/tmp/xhprof"
I created the file /tmp/xhprof with 755 www-data:www-data
I can confirm that php has xhprof enabled with phpinfo(), although it doesn't give me the output_dir parameter.
I run a script that has the first line
xhprof_enable(XHPROF_FLAGS_NO_BUILTINS | XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY);
There are no files created in /tmp/xhprof
I have restarted php5-fpm and still no luck.
http://php.net/manual/en/xhprof.configuration.php
At the end of profiling (or script) you need to save data manually
http://php.net/manual/en/xhprof.examples.php
If you don't want to control profiling in your application code you can make an auto loaded code snippet
/path/to/xhprof/xhprof_enabler.php:And then add
to
/etc/php5/fpm/conf.d/20-xhprof.iniPlease note that you also need to setup a virtual host for profile viewing, or you can just symlink
xhproffolder (which containsxhprof_html) to your default vhost root.Restart
php5-fpmand you should be done.