Can't install Xhprof in PHP 5.4

我只是一个虾纸丫 提交于 2020-01-05 06:32:08

问题


I'm getting the following error when trying to use xhprof in PHP 5.4

PHP Warning:  PHP Startup: xhprof: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525

It looks like I have some conflict with PHP versions as I installed 5.4 some days ago. php-v shows 5.4 but php-config --version shows 5.3 and phpize shows API=20090626 while PHP is compiled with API=20100525


回答1:


sudo apt-get install php5-dev

In my case the solution was to upgrade the package php5-dev. It looks like when I upgraded php to 5.4 didn't upgrade the php5-dev one, that's why php-config and phpize were outdated. So problem solved.




回答2:


Correct, you do need to install php5-dev.

This is mentioned in my complete guide to installing XHProf, available here http://www.insprinto.com.au/display/turbocharge-your-php-with-xhprof?id=4



来源:https://stackoverflow.com/questions/22630762/cant-install-xhprof-in-php-5-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!