How to install XHProf profiler on Ubuntu
XHProf profiler is developed by Facebook and open sourced in March 2009 under the Apache 2.0 license. XHProf is a function-level hierarchical profiler, with a PHP extension (written in C) to collect the raw data, and a few PHP scripts for the reporting/UI layer.
The easiest way to get it is via the PEAR installer (package home):
install php5-common
pear channel-update pear.php.net
pecl install xhprof
Once you have XHProf installed, you should enable it. Open your /etc/php5/conf.d/xhprof.ini and add
[xhprof]
extension=xhprof.so
xhprof.output_dir="/var/tmp/xhprof"
Where /var/tmp/xhprof is the directory that will collect the profile data for each run.
Restart apache, and the XHProf extension should be enabled (check with "php -m" that this is the case).
Comments
Anonymous (not verified)
Sun, 06/23/2013 - 07:10
Permalink
Failed to download
Failed to download pecl/xhprof within preferred state "stable", latest release is version 0.9.3, stability "beta", use "channel://pecl.php.net/xhprof-0.9.3" to install
Anonymous (not verified)
Fri, 09/13/2013 - 09:21
Permalink
pecl install xhprof-beta
pecl install xhprof-beta solves your problem
Add new comment