1

I am on windows 7, 64bit, with xampp 3.2.1 installed . I got my xdebug dll file through the xdebug.org wizard, and put it where the wizard told me to, C:\xampp\php\etc. Then I made sure to modify the correct (and as far as I'm aware only) php.ini file at C:\xampp\php\php.ini. This is the same ini that phpinfo() reports.

When I run php -m , I can see the xDebug extension listed twice, just as it should be. But going back to a phpinfo() output, the extension is not listed.

I've tried restarting my computer, apache. If I try to run this script to test if xdebug is working, it gives me a error

socket_bind(): unable to bind address [10048]:Only one usage of each socket address (protocol/network address/port) is normally permitted

2
  • phpinfo() will tell you exactly which .ini files are being processed. there's generally two of them: one for command line, one for SAPI (webserver). you probably have xdebug only in the CLI .ini file Commented Jun 12, 2014 at 17:40
  • But my phpinfo() says "loaded configuration file" : C:\xampp\php\php.ini . when I do "php --ini", there's only that one file Commented Jun 12, 2014 at 17:48

1 Answer 1

3

After hours of hair pulling... and a nap, I came across this config code and it somehow worked. Now that the extension is on firm ground, I can start carefully adding or removing features one at a time.

zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll" // whatever your file name is
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host= "localhost"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

The root problem was a messed up php.ini file. The problem is that xampp's php.ini has some defaults listed there that we are told to uncomment by xdebug,netbeans, other online guides. Unfortunately, given the certain combinations of values, that just didn't work. This list of parameters definitely worked for me though.

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

2 Comments

Thanks. After hours of trying all kinds of configs, this one also worked for me (using Wamp 2.5).
Where do I have to add this in the phpini? Under the [PHP] tag?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.