No xdebug in phpinfo()

Viewed 27813

I have added following lines into php.ini

[XDebug]
zend_extension = C:\PROGRA~1\PHP5\ext\php_xdebug-2.1.0-5.3-vc9.dll
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

Version of php_xdebug-2.1.0-5.3-vc9.dll is obtained via page http://www.xdebug.org/find-binary.php.

But there are no any mentions of 'xdebug' string in output of phpinfo().

What can be wrong?

(This is my second fight with php-xdebug to get working, first time I gave up. If you have other suggestions concerning debugging please add them also, possibly as comments to the question. I would like to following scenario work under windows: "Set up break point, run my script, it stops on break point and I can see the value of some variable". Thanks)

UPDATE

Restart of Apache does not resolve the issue. In log file the message appears:

Apache/2.2.14 (Win32) PHP/5.3.1 configured - resuming normal operations

13 Answers

This worked for me (vscode, xampp) Go to https://xdebug.org/wizard.php and paste the contents of phpinfo()

Then download the right xdebug.dll and place it in your 'ext' folder.

Add the following to your php.ini

[XDebug]
zend_extension="php_xdebug-2.5.4-7.0-vc14.dll"
xdebug.remote_enable=1
xdebug.remote_autostart=1

Writing in January 2019, I found that following the Xdebug Wizard at Xdebug wizard here

exactly, including using their download link to the correct version of Xdebug for your version of PHP and copying the line to insert on your php ini exactly as is, got Xdebug appearing in phpInfo for me. I was installing into Laragon . Running php -m from the command line gave a good confirmation of all being well, with Xdebug loading as a Zend Extension. Usual gotchas about needing to restart server etc apply.

In my case, Xdebug is showing in php -m, php -i but not in phpinfo() result.

Restarting Apache didn't help until restarting php-fpm

systemctl restart php-fpm.service

In my case the issue was the file path which apache loaded, the file php.ini I changed is not the current loaded config, so check it First.

xdebug appears in "php -m" command line BUT nothing on the browser <?php phpinfo(); page ! Check in httpd.conf PHPIniDir "C:/to/the/RIGHT/phpversion" The command line php.exe use the Environment PATH variable but nut the apache !

Related