Jump to content


Photo

How to install XDebug for PHP5 on windows?


  • Please log in to reply
15 replies to this topic

#1 ivytony

ivytony

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 08 February 2009 - 05:02 PM

I am using Apache + PHP 5.2.8 on my laptop installed with Windows Vista 32 and it works just fine. I have been trying to install XDebug since last night, but haven't got any luck getting it to work.

Basically, I downloaded the .dll binary file (5.3 VC9) from http://www.xdebug.org/download.php, and put it in the PHP extension directory (C:\php\ext), then changed the php.ini to below:

uncommented this line:

extension=php_xdebug.dll


added this block at the end of the file:

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="C:\php\ext\php_xdebug-2.0.4-5.3.0-vc9.dll"
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=10000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\php\xdebug\tmp"


I restarted my apache, but I still couldn't find the XDebug section in my phpinfo.php output. I wonder what else I need to do?

Thanks in advance!



#2 wildteen88

wildteen88

    Advanced Member

  • Staff Alumni
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 February 2009 - 05:17 PM

You dont need to add php_xdebug.dll to the extension= list you only need to add the block of configuration that you added. Make sure zend_extension_ts= points to the dll file you just downloaded

After making changes to the php.ini restart your http server.

Also as you're using php5.2.x you should of downloaded 5.2 VC6 not 5.3 VC9

#3 ivytony

ivytony

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 08 February 2009 - 05:21 PM

You dont need to add php_xdebug.dll to the extension= list you only need to add the block of configuration that you added. Make sure zend_extension_ts= points to the dll file you just downloaded

After making changes to the php.ini restart your http server.

Also as you're using php5.2.x you should of downloaded 5.2 VC6 not 5.3 VC9


all right, I just did what you suggested here, but I still cannot see the 'xdebug' shown in my phpinfo.php output. any ideas? :( thanks

#4 Mchl

Mchl

    Advanced Member

  • Staff Alumni
  • 8,507 posts
  • LocationHigh Memory Area

Posted 08 February 2009 - 05:21 PM

Make sure you edit correct php.ini file.
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

#5 wildteen88

wildteen88

    Advanced Member

  • Staff Alumni
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 February 2009 - 05:23 PM

You restarted Apache

I am only following the installation instructions here

#6 ivytony

ivytony

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 08 February 2009 - 05:30 PM

tried everything, but still xdebug doesn't show up in phpinfo(). I am pretty sure that I am editing the right php.ini file.

#7 wildteen88

wildteen88

    Advanced Member

  • Staff Alumni
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 February 2009 - 05:31 PM

run phpinfo() and post what the Loaded Configuration File line reads.

#8 corbin

corbin

    Advanced Member

  • Staff Alumni
  • 8,129 posts

Posted 08 February 2009 - 05:31 PM

Look in Apache's error log.  If it says something about unable to find the DLL, try stating the path differently (drive letter and / instead of \ or something).

If it doesn't say any error or anything, then you are editting the wrong php.ini.
Why doesn't anyone ever say hi, hey, or whad up world?

#9 ivytony

ivytony

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 08 February 2009 - 05:41 PM

phpinfo() shows:

1. Loaded Configuration File C:\php\php.ini

2. Loaded Modules:

core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_php5




Here's the error message in apache error logs:

Xdebug requires Zend Engine API version 220070929.
The Zend Engine API version 220060519 which is installed, is outdated.


I wonder what this means?

#10 Mchl

Mchl

    Advanced Member

  • Staff Alumni
  • 8,507 posts
  • LocationHigh Memory Area

Posted 08 February 2009 - 05:45 PM

Strange... how can you get outdated API with PHP 5.2.8???
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

#11 ivytony

ivytony

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 08 February 2009 - 05:46 PM

Strange... how can you get outdated API with PHP 5.2.8???


exactly! PHP Version 5.2.8

Should I install the latest version of Zend Engine?

#12 wildteen88

wildteen88

    Advanced Member

  • Staff Alumni
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 February 2009 - 05:47 PM

What are your versions of Apache. Xdebug is compatible with certain API versions. I have Apache2.2.11 and PHP5.2.8

xdebug (v5.2VC9) works for me

#13 Mchl

Mchl

    Advanced Member

  • Staff Alumni
  • 8,507 posts
  • LocationHigh Memory Area

Posted 08 February 2009 - 06:15 PM

I've Apache 2.2.10 and PHP 5.2.6. Working with XDebug 5.2VC6
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

#14 ivytony

ivytony

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 08 February 2009 - 06:16 PM

I also use Apache 2.2.11 with PHP 5.2.8. weird

#15 emceha

emceha

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 09 February 2009 - 11:36 AM

Hello, I'm totaly newbie in PHP and it is my first post so don't be to mean:D

Today i had similar problem.
Problem was in bad file path.

I'm using WAMP pack so probably this is diffrent situation, but if you are  using PHP as Apache module,  your PHP.INI have to be somewhere here: "/php5/apache/php.ini "

in XAMPP:"apache/bin/php.ini"

in WAMP: "wamp/bin/apache/Apache2.2.11/bin/php.ini"
 
In first moment i tried to edit: "wamp/bin/php/php5.2.8/php.ini". 
That was my mistake. This .ini was first one I found. :'(


I have php 5.2.8
xdebug - php_xdebug-2.0.4-5.2.8.dll
everything is ok now.


#16 Mchl

Mchl

    Advanced Member

  • Staff Alumni
  • 8,507 posts
  • LocationHigh Memory Area

Posted 11 February 2009 - 02:50 PM

WampServer has a shortcut to php.ini in its tray menu.
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com