vicmarq
vicmarq

Reputation: 197

Can't install Xhprof in PHP 5.4

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

Upvotes: 1

Views: 1059

Answers (2)

robbiecahill_
robbiecahill_

Reputation: 135

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

Upvotes: 0

vicmarq
vicmarq

Reputation: 197

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.

Upvotes: 2

Related Questions