1

I've installed PHP 5.3.8 on my localhost and I tried to configure Xdebug, but for some reason, Xdebug doesn't seem to work. I've added following lines to my php.ini file:

zend_extension = C:\Server\PHP\5.3.8\ext\php_xdebug-2.1.3-5.3-vc9.dll xdebug.remote_enable=on xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=”dbgp” 

And of course, the file in the zend_extension path is exists. And I also have tried restarting my Apache.
Is there a specific type of Xdebug for every version of PHP or is this just a matter of a bad configuration?

EDIT:
I've tried every 2.1.3 and 2.1.2 dll available on the Xdebug site, but none of them seems to work...

EDIT 2: Ok, great, I just got the latest Xdebug version working, but my var_dump's still look awful... Here is what they look like:

array(3) { [0]=> string(4) "text" [1]=> string(4) "node" [2]=> string(6) "blabla" } 

But they used to look like this:

array(3) 0 => 'text' string(4) 1 => 'node' string(4) 2 => 'blabla' string(6) 

How do I get them to look like this?

8
  • check PHP from command line write down here what error are you getting. Commented Feb 6, 2012 at 11:36
  • I hope you don't really mean PHP 3.5.5. Commented Feb 6, 2012 at 12:08
  • Holy crap... nope. My mistake. I meant 5.3.5 Commented Feb 6, 2012 at 12:12
  • does zend_extension need ".dll" tacked on the end? Commented Feb 6, 2012 at 12:16
  • 1
    The var_dumps require html_errors set to 1 in php.ini Commented Feb 6, 2012 at 12:54

3 Answers 3

3

Xdebug has a fantastic phpinfo() output parser which determines exactly what version of Xdebug you need and even gives you personalised instructions based on this. Simply visit:

http://xdebug.org/find-binary.php

and you'll be up and running in no time.

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

7 Comments

The setup is suggesting I have to install php_xdebug-2.1.3-5.3-vc6.dll but the given link is broken...
Oh you mean the Xdebug dll it says you need isn't available from them. Perhaps you can try googling the specific one you need. Failing that, perhaps you should explain what you mean by 'doesn't seem to work'.
Apparently this version isn't supported, you need a newer version of XAMPP: xdebug.org/archives/xdebug-general/2166.html
Ok, thanks for the comments. I've updated my PHP version to 5.3.8 and this time, the suggested dll on the find-binary.php link was found. I installed it, but phpinfo() still isn't showing me the Xdebug path...
Paste your new phpinfo into their parser again and see if it says it's succesfully installed. Did you restart your web server yet?
|
2

If your var_dump looks "awful" then you need to set html_errors=1. Xdebug respects PHP's normal error reporting settings and (sadly) in PHP 5.3 that default now has html_errors=0. Simply set it back to 1 in php.ini.

Comments

1

Of course the xdebug version must be compatible with the php version. Yours look well (you can check it in the download page: enter link description here).

Next, check the Zend Engine is running with xdebug. phpinfo() must return something like:

This program makes use of the Zend Scripting Language Engine: Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies with Xdebug v2.2.0-dev, Copyright (c) 2002-2011, by Derick Rethans 

If you don't see the line "with Xdebug..." the problem is on the dll. If you see that line, xdebug is running ok. Then the problem comes from the client side, maybe due to a configuration problem.

1 Comment

There is no "with Xdebug" line in my phpinfo. So I'm guessing the problem is with the dll? How can I find the correct dll? The link on the Xdebug (xdebug.org/find-binary.php) shows me a file that doens't exists anymore...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.