1

I tried to configure Xdebug following this tutorial https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html#updatingPhpIni but I keep getting this error ( the path is correct )

PS C:\Users\Yasmine Daly\Downloads\ES-184\EstimateV2> php --version                                                                                
Failed loading C:\xampp\PHP\ext\php_xdebug-3.1.5-7.4-vc15-nts-x86_64.dll
PHP 7.4.29 (cli) (built: Apr 12 2022 20:21:18) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
PS C:\Users\Yasmine Daly\Downloads\ES-184\EstimateV2>

php.ini

[xdebug]
zend_extension="C:\xampp\PHP\ext\php_xdebug-3.1.5-7.4-vc15-nts-x86_64.dll"
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port=9003
LazyOne
  • 158,824
  • 45
  • 388
  • 391
Yasmine Daly
  • 116
  • 7
  • *"( ZTS Visual C++ 2017 x64 )"* and *"php_xdebug-3.1.5-7.4-vc15-nts-x86_64.dll"* -- looks like you have TS (Thread Safe) version of PHP but trying to use NTS (Non Thread Safe) version of Xdebug. Run `php -i` and check the very top part of the output -- look for `Thread Safety =>` -- does it say "enabled" or "disabled" there? If "enabled", then you need TS version of Xdebug. – LazyOne Jul 12 '22 at 15:54
  • Yes you're right it is enabled ! Thank you . – Yasmine Daly Jul 12 '22 at 16:06

1 Answers1

1

Accordingly to your info:

( ZTS Visual C++ 2017 x64 )
php_xdebug-3.1.5-7.4-vc15-nts-x86_64.dll

Looks like you have TS (Thread Safe) version of PHP but trying to use NTS (Non Thread Safe) version of Xdebug. They are not compatible: you need to get Xdebug of the same build as PHP itself.

Run php -i and check the very top part of the output -- look for a line that starts with Thread Safety => -- does it say "enabled" or "disabled" there?

If it's "enabled" then you need TS version of Xdebug.

LazyOne
  • 158,824
  • 45
  • 388
  • 391