mac 下 配置 xhprof
1: 下载 安装 xhprof wget http://pecl.php.net/get/xhprof-0.9.3.tgz tar zxf xhprof-0.9.3.tgz cd xhprof-0.9.3 cd extension phpize (执行 此代码时报错, Cannot find autoconf. Please check your autoconf installation 解决方法见 5 ) which php-config(#找到 php-config 这个文件的路径) ./configure --with-php-config=/usr/bin/php-config #此处的地址就是上面你记录下来php-config的地址 make make install 提示: Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20121212/ 2:配置php.ini php.ini文件 :您可以更新您的php.ini文件来自动加载您的扩展。将以下内容添加到你的php.ini文件。 [xhprof] extension="no-debug-non-zts-20121212/xhprof.so"(#php.ini中extension_dir 已经存在了,所以直接写相对路径了) ;