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

geoB
  • 4,578
  • 5
  • 37
  • 70
  • Have you tried https://xdebug.org/wizard to find the right file? – Derick Oct 29 '21 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. – geoB Oct 30 '21 at 00:15

1 Answers1

5

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.

Derick
  • 35,169
  • 5
  • 76
  • 99