PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Dec 18, 2014 5:22 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Jul 07, 2009 12:01 pm 
Offline
Forum Newbie
User avatar

Joined: Mon Aug 11, 2008 11:59 am
Posts: 6
Location: Athens, Greece
I'm trying to install xdebug 2.0.5 on windows xp sp3 to use it with Netbeans 6.7, but i can't even make it load when apache starts. My PHP version is 5.3 and the xdebug configuration on php.ini looks like this:

zend_extension_ts="C:\Webserver\PHP\ext\php_xdebug-2.0.5-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

When i try the php -m command on the console i don't see the xdebug module listed.


Top
 Profile  
 
PostPosted: Sat Jul 11, 2009 12:06 pm 
Offline
Forum Newbie

Joined: Fri Jul 10, 2009 3:51 pm
Posts: 3
I recently started development with Zend Framework and Netbeans 6.7 IDE. So the first thing I was looking for was how to debug. And came to xdebug.

There are some issues - you have to match xdebug versions carefully - multithreaded or singlethreaded, and appropriate xdebug versions for certain PHP versions. I have ApacheFriends XAMPP (Basispaket) version 1.7.1 for Windows, it has PHP 5.2.9. And the appropriate xdebug library already was there in ext folder!

My php.ini is located in G:\xampp\php (sometimes there were problems with multiple php.ini files so it was hard to guess which one is being loaded, but in latest XAMPP it is OK).

I have set php.ini following (Zend and Xdebug sections were already there by default, but XDebug was commented out):

Syntax: [ Download ] [ Hide ]
 
[Zend]
;; Only Zend OR (!) XDebug
;zend_extension_ts = "G:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "G:\xampp\php\zendOptimizer\lib\Optimizer"
;zend_optimizer.enable_loader = 0
;zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
; Local Variables:
; tab-width: 4
; End:
 
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="G:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="G:\xampp\tmp"
 


So you see, if you have anything Zend related enabled, you have to disable it for development environment.

When I run phpinfo from XAMPP Admin page, I see the following in the first table:

Syntax: [ Download ] [ Hide ]
...
PHP Extension   20060613
Zend Extension  220060519
...
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with Xdebug v2.0.4, Copyright (c) 2002-2008, by Derick Rethans


php -m shows
Syntax: [ Download ] [ Hide ]
[Zend Modules]
Xdebug

at the very end of list.

I also downloaded wincachegrind utility for inspecting xdebug.profiler files, have not tried it yet.

Now debugging with NB 6.7 works fine, although sometimes it is annoying, that it stops at the very beginning of each script although I need it to stop just at a breakpoint.

And I suggest to turn also
magic_quotes_gpc = Off
(by default it is on) because PHP manual says this setting is deprecated and will be dropped soon. And if you leave it on, you may have some issues with double escaping. You can also set this to off in .htaccess to be sure that your app works fine even on a servers where magic_quotes_gpc is on.


I hope, this info will be useful. It just hard to tell, why it does not work for you because I use almost fully preconfigured XAMPP package :wink:


Top
 Profile  
 
PostPosted: Sat Aug 01, 2009 4:42 am 
Offline
Forum Newbie
User avatar

Joined: Mon Aug 11, 2008 11:59 am
Posts: 6
Location: Athens, Greece
Well i changed the zend_extension_ts to zend_extension and it works great!

And now my configuration looks like this:

Syntax: [ Download ] [ Hide ]
zend_extension="C:\Webserver\PHP\ext\php_xdebug-2.0.5-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp


I hope this is helpful to everyone that has the same problem i had.


Top
 Profile  
 
PostPosted: Thu Aug 27, 2009 9:30 pm 
Offline
Forum Newbie

Joined: Wed Dec 24, 2008 11:45 pm
Posts: 2
http://www.php.net/ChangeLog-5.php#5.3.0

* Removed all zend_extension_* php.ini directives. Zend extensions are now always loaded using zend_extension directive. (Derick)


Yeah... I fell for this too... PHP quietly discards my xdebug line without any warning messages.


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 4:15 am 
Offline
Forum Newbie

Joined: Sun Sep 06, 2009 4:13 am
Posts: 2
Is there really only one php.ini file now in XAMPP? xampp/php/php.ini?


Top
 Profile  
 
PostPosted: Mon Sep 07, 2009 7:04 am 
Offline
Forum Newbie

Joined: Sun Sep 06, 2009 4:13 am
Posts: 2
Answering my own question, yes there is.
Also, you do not have to download Xdebug with XAMPP 1.7.2. It has an Xdebug dll included in it that works just fine. And you don't have to disable zend_optimizer in php.ini, either, because it isn't enabled.


Top
 Profile  
 
PostPosted: Mon Sep 21, 2009 5:38 pm 
Offline
Forum Commoner

Joined: Sat Feb 28, 2009 4:27 pm
Posts: 66
I have Apache 2.2.13 (Win32) with PHP 5.3.0 VC9 Thread-Safe, and I did exactly as the doctor ordered...

Dark Dominion wrote:
Syntax: [ Download ] [ Hide ]
zend_extension="C:\Webserver\PHP\ext\php_xdebug-2.0.5-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp



And I tried this out for both php_xdebug-2.0.5-5.3-vc6.dll and php_xdebug-2.0.5-5.3-vc9.dll, and yes I restarted Apache 2.2.13 (Win32) each time. And Xdebug does not load!

1. With php_xdebug-2.0.5-5.3-vc6.dll, it did nothing.
2. With php_xdebug-2.0.5-5.3-vc9.dll, it faults with the following error message in event log:
Quote:
With Faulting application name: httpd.exe, version: 2.2.13.0, time stamp: 0x4a7b422b
Faulting module name: php_xdebug-2.0.5-5.3-vc9.dll, version: 2.1.0.0, time stamp: 0x4a4c79bc


Other details...
Syntax: [ Download ] [ Hide ]
PHP 5.3.0 (cli) (built: Jun 29 2009 21:55:01)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
 
Compiler  MSVC9 (Visual C++ 2008)  
Architecture  x86
 
Debug Build => no
Thread Safety => enabled


Any recomendations?

Jeff in Seattle


Top
 Profile  
 
PostPosted: Wed Oct 21, 2009 2:48 am 
Offline
Forum Newbie

Joined: Wed Oct 21, 2009 2:46 am
Posts: 1
http://bugs.xdebug.org/view.php?id=452


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group