Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdebug requires different Zend version

Tags:

php

xdebug

I'm really at a loss with this, I just dont understand how to fix this error.

Xdebug requires Zend Engine API version 220121212.
The Zend Engine API version 220131226 which is installed, is newer.

I've read something about phpize but when I run the command I get...

Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

I'm not sure what this means. What is the top level source directory?

Can anyone help me please?

Thanks

like image 457
bencarter78 Avatar asked Sep 21 '15 20:09

bencarter78


3 Answers

I found this which I think it will help you

https://xdebug.org/wizard.php

Edit

Also worth noting this FAQ guide here under Compilation and Configuration --> Q: What to do with: Xdebug requires Zend Engine API version xxxxxxxx. The Zend Engine API version 2xxxxxxxx which is installed, is newer.

Q: What to do with: Xdebug requires Zend Engine API version xxxxxxxx.

The Zend Engine API version 2xxxxxxxx which is installed, is newer. A: This message means that you are trying to load Xdebug with a PHP version for which it wasn't built. If you compiled PHP yourself, it is most likely because you compiled Xdebug against PHP headers that belong to a different PHP version that you're running. For example, you're using PHP 5.3 and the headers you're using are still PHP 5.2. If you are using a pre-compiled binary, then you're using the wrong one. To diagnose if this is your problem, make the following steps: Check what the "Zend Extension" API number is of the PHP version that you are running by looking at phpinfo() (or "php -i") output. You can find it in the top part of the output, in the same block as the PHP logo and the PHP version. As examples, for PHP 5.2, the number is "220060519" and for PHP 5.3 it is "220090626". Check what the output of "phpize" is when you're completing the compilation steps. The number that you're looking for is on the line that says "Zend Extension Api No". If the two numbers from above do not match, you're compiling with the wrong PHP headers. Refer to the next FAQ entry to figure out which phpize to use.

like image 177
Bogdan Alexandru Militaru Avatar answered Oct 30 '22 03:10

Bogdan Alexandru Militaru


it's easy, this is working on me. just install this

sudo apt install php7.3-xdebug

or you can choose your own php version. php7.1-xdebug, php7.2-xdebug and etc

like image 41
nur zazin Avatar answered Oct 30 '22 01:10

nur zazin


Run: phpize --help This shows you the full path to phpize. This path should be the same as where you have the CLI binary, php-config and the "pear" and "pecl" binaries installed. If you run php-config --version it should show the same version of PHP that you're running. If it doesn't match up, and perhaps the wrong "phpize" binary is found on the path, you can run configure as follows:

/full/path/to/php/bin/phpize
./configure --with-php-config=/full_path_to_php-config

In my case on i used this path for lampp and it worked.

/opt/lampp/bin/phpize
./configure --with-php-config=/opt/lampp/bin/php-config

Or you can follow this xDebug Installation Wizard

like image 4
Shahzaib Hayat Khan Avatar answered Oct 30 '22 01:10

Shahzaib Hayat Khan