xhprof 插件编译安装及使用

2015 年 6 月 24 日 at 下午 5:46分类:PHP

1. wget http://pecl.php.net/get/xhprof-0.9.4.tgz
2. tar zxvf xhprof-0.9.4.tgz
3. cd xhprof-0.9.4/extension
4. /usr/local/php/bin/phpize
5. ./configure –with-php-config=/usr/local/php/bin/php-config
6. 在php.ini 中增加
[xhprof]
extension=xhprof.so;
; directory used by default implementation of the iXHProfRuns
; interface (namely, the XHProfRuns_Default class) for storing
; XHProf runs.
;
;xhprof.output_dir=
xhprof.output_dir=/tmp/xhprof

7. 重启服务 查看phpinfo
8. cp -r xhprof_lib xhprof_html 两个文件夹到网站根目录 建立 777权限 /tmp/xhprof
9. yum install graphviz-gd
10.访问此路径能看到相关的信息。

按照实例配置点击查看图片后,发现提示错误
编辑php.ini 修改disable_functions exec system poct_open (xhprof里面)