1

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

2 Answers 2

2
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
  • 1
    what OS and Distro did you have this issue on? How did you update PHP (not php-dev)? There may be a dependency error in your distro's repositories. If so report it over there. Mar 26, 2014 at 10:03
  • Borislav I actually solved my problem. PHP was updated by another person that's why things got messed so much. After updating php5-dev package the problem was fixed. I just posted it in case another people run into this same problem since the other proposed solutions I found on the Internet didn't work in my case. Thanks
    – vicmarq
    Mar 26, 2014 at 14:17
0

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.