20

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

3 Answers 3

19

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.

1
  • Trying to use xdebug with a language it wasnt built against was my issue. I installed it via brew and it compiled to the latest PHP version that was available and then i tried using that compiled version with some other php versions...so it showed that message according to your response Commented Feb 13 at 5:02
15

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

5

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

2
  • Exactly what I was looking for. Thanks Commented Oct 26, 2017 at 12:39
  • This is exactly what I was doing but it would still throw that error at me. I even rebooted, removed the xdebug dir, extracted and compiled again. What solved it for me was calling phpize --clean.
    – Clox
    Commented Jan 30, 2018 at 14:26

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.