1

I am trying to install xDebug for php7.2 but keep receiving the following error when i execute ./configure to generate the make file:

checking Check for supported PHP versions... configure: error: not supported. Need a PHP version >= 7.1.0 and < 8.0.0 (found 5.4.16)

When i run php -i it returns:

PHP 7.2.29 (cli) (built: Mar 17 2020 11:58:47) ( NTS )
Copyright (c) 1997-2018 The PHP Group

I have also created a symlink for /usr/bin to usr/bin/php72 to be able to run it on the terminal.

It still suggests that i am running an older version of php when running ~/xdebug-2.9.4/.configure

I was following these guidelines:

Run: ./configure

Run: make

Run: cp modules/xdebug.so /opt/remi/php72/root/usr/lib64/php/modules

Edit /etc/opt/remi/php72/php.ini and add the line

zend_extension = /opt/remi/php72/root/usr/lib64/php/modules/xdebug.so

Make sure that zend_extension = /opt/remi/php72/root/usr/lib64/php/modules/xdebug.so is below the line for OPcache.

1 Answer 1

2

It happens because you're configuring with default settings and that is different from the PHP version you're trying to configure.

Just like you saw the PHP version using the php -i command, check the php-config version using the php-config --version command, it should be the same as php -i, but in your case, it would be different and hence this issue.

Now let's talk about how we can solve it. Since you need a different version of config, you should point that to the configure command.

For example, in your case, you need php-config7.2 (because you're using PHP v7.2, similarly for 7.3 you have php-config7.3 and so on)

To point the configure command to a specific PHP version you need to specify that as a flag called with-php-config and the value should be the location of the php-config file, a sample would be

./configure --with-php-config=/usr/bin/php-config7.1

The remaining steps remain as it is.

Hope this solves the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .