0

In Windows 10 with PHP 8.0.2, attempts to load 3 different versions of xdebug all fail with Failed loading Zend extension 'php_xdebug-... Versions tried:

php_xdebug-2.9.8-7.3-vc15-x86_64.dll php_xdebug-3.0.3-8.0-vs16-x86_64.dll php_xdebug-3.1.1-8.0-vs16-x86_64.dll 

It made no difference if the file name was quoted or not, nor did including the path either as C:\\... or C:/...

What am I missing?

sample error message in apache error.log:

PHP Warning: Failed loading Zend extension 'php_xdebug-2.9.8-7.3-vc15-x86_64.dll' (tried: C:\\php\\ext\\php_xdebug-2.9.8-7.3-vc15-x86_64.dll (The specified module could not be found), C:\\php\\ext\\php_php_xdebug-2.9.8-7.3-vc15-x86_64.dll.dll (The specified module could not be found)) in Unknown on line 0

php.ini/xdebug:

[xdebug] zend_extension="php_xdebug-2.9.8-7.3-vc15-x86_64.dll" xdebug.mode=debug xdebug.client_host=localhost xdebug.client_port=9003 xdebug.idekey="netbeans-xdebug" 

Apache is Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/8.0.2

Windows is Windows NT GWB-10 10.0 build 19042 (Windows 10) AMD64

Reverting to PHP 7.x is not a real option

2
  • Have you tried xdebug.org/wizard to find the right file? Commented Oct 29, 2021 at 23:37
  • 1
    Pointed me in the right direction, so please post this as an answer. What the wizard told me was PHP version 8.0.2 is not supported on Windows due to missing exported symbols in zlib, upgrade to at least 8.0.7. Updated to 8.0.12 and xdebug loads. Thanks. Commented Oct 30, 2021 at 0:15

2 Answers 2

6

Please use Xdebug's wizard to find out which file to download.

You can only use DLLs that were made for the exact PHP minor version (8.0, 8.1, etc). You can't ever load a DLL that is made for PHP 7.3 with PHP 8.0 for example. Which is what the error message tells you.

There are some incompatibilities with Xdebug 3.1 on Windows due to compression support with zlib. In order to load Xdebug 3.1 on Windows, you need to have at least PHP 8.0.7 — the wizard will tell you that too.

Sign up to request clarification or add additional context in comments.

Comments

-2

Another option is need to check correct dll version with current PHP version, TS (Thread Safe) or Non TS version.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.