I have a php version of 7.1.1, and the phpize I installed by following the instructions from https://xdebug.org/wizard.php is like this,

Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012

when I searched about this, it is for php 7.0

Is there a way I can change this? I followed this instruction https://xdebug.org/docs/faq#custom-phpize but still not working.

3 Answers 3


In Ubuntu 16 Vagrant box with multiple versions of PHP installed and having PHP7.1 as default. I ran the following commands:

sudo update-alternatives --set phpize /usr/bin/phpize5.6
sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --set php-config /usr/bin/php-config5.6
  • Thanks for your answer!
    – Sergey
    May 6 at 10:52

In my case

php -v showed version 7.2, and

php-config --version showed version 7.0

My solution was to run:

sudo apt-get install php7.2-dev

so that versions match

And now running php-config --version shows 7.2 properly

And running phpize shows:

Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718

(changed from 20151012 to 20170718)


I found that running the specific version of phpize and php-config which matched the php version (7.2) solved my compilation issues:

$ /opt/cpanel/ea-php72/root/usr/bin/phpize
$ ./configure --enable-shared --with-php-config=/opt/cpanel/ea-php72/root/usr/bin/php-config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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