Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Xdebug on PHP 5.6

Tags:

php

xdebug

I have httpd 2.4.38 win64 VC11 and old PHP 5.6.4 Win32 VC11 x64. I want to install Xdebug but I have an error:

Failed loading C:/laragon/bin/php/php-5.6.0-Win32-VC11-x64/ext\php_xdebug-2.5.5-5.6-vc11-nts-x86_64

My php.ini

[xdebug]
zend_extension = "C:\laragon\bin\php\php-5.6.4-Win32-VC11-x64\ext\php_xdebug-2.5.5-5.6-vc11-nts-x86_64.dll"
xdebug.remote_enable=1
xdebug.remote_connect_back=On
xdebug.remote_port="9000"
xdebug.profiler_enable=0
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true

I don't understand this error, because in my opinion, I have a good version of Apache, PHP, and of course Xdebug. Where is the problem?

like image 389
Jacek Nowak Avatar asked Dec 17 '22 15:12

Jacek Nowak


2 Answers

Yesterday I ran into a problem regarding xdebug and this(5.6) version of PHP.

Originally I had gotten the latest version of 5.6 (5.6.4) and didn't realized my xdebug was NTS while my PHP was TS. I got the NTS version of PHP instead and it started to work.

So based on your information I would say you need to either get the TS version of xdebug or else the NTS version of PHP

https://xdebug.org/download -- PHP 5.6 VC11 TS
or
https://windows.php.net/downloads/releases/archives/ -- php-5.6.0-nts-Win32-VC11-x64.zip

This post got me there (realizing my NTS/TS difference) -- https://forum.laragon.org/topic/169/solved-xdebug-php-7-0-8/16

I also did notice (as mentioned in another answer) your error and ini file do not match:
Error: C:/laragon/bin/php/php-5.6.0-Win32-VC11-x64/ext\php_xdebug-2.5.5-5.6-vc11-nts-x86_64
Calling: C:\laragon\bin\php\php-5.6.4-Win32-VC11-x64\ext\php_xdebug-2.5.5-5.6-vc11-nts-x86_64

5.6.0 !== 5.6.4, so that could very well have been your issue (just getting it all synced to 5.6.4)

like image 90
rabbitt Avatar answered Jan 06 '23 06:01

rabbitt


Use the wizard at https://xdebug.org/wizard to tell you which binary you need to download. However, PHP 5.6 is no longer supported by the PHP project, so you really need to upgrade to PHP 7.3 as well, where an improved Xdebug and PHP versions should be really helpful.

like image 34
Derick Avatar answered Jan 06 '23 08:01

Derick