Apache crashing only with xdubug on

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apache crashing only with xdubug on

Postby markchicobaby » 27. March 2009 02:39

Using
XAMPP 1.7.0
Windows XP SP3
Running on localhost 2GB RAM

Hi thanks for creating such convenient great software!

I've seen this elsewhere on the forum but the fixes have not worked for me, also my php error log file is empty! The Apache log file gives no information at all just some restarting messages.

I have a problem where I get error message "Apache has encountered a problem and needs to close" about 10% of the time. Apache actually keeps on running (or tries to restart itself) so if I keep hitting refresh the web page eventually comes up. It is a bit of a worry and inconvenient. Sometimes it is quite stable and I can run for 15 minutes without problem, then sometimes I get it constantly. I've even got it immediately after a reboot so I think it is not RAM or memory issues.

I've found it is only an issue when Xdebug is enabled. Turning off Xdebug fixes it. However I would very much like to use Xdebug so I would love to fix it.

These are the settings in my php.ini when I enable Xdebug:

Code: Select all
I leave this commented out:
;extension=php_xdebug.dll

and further down:

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="C:\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="C:\xampp\tmp"


When I start getting the Apache error message, I comment out one line:
Code: Select all
[XDebug]
;; Only Zend OR (!) XDebug
;zend_extension_ts="C:\xampp\php\ext\php_xdebug.dll"                  << Just this one
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="C:\xampp\tmp"


And restart Apache. The error goes away, but I still need to use Xdebug.

Additional information is that when I click on the Windows dialogue box for more info, I get
appname=apache.exe
modname= php_xdebug.dll

which is why I turned this off.

Any ideas please?

Thank you
Mark
markchicobaby
 
Posts: 3
Joined: 27. March 2009 02:21

Re: Apache crashing only with xdubug on

Postby Izzy » 27. March 2009 03:01

When using XDebug did you comment out the whole of the [Zend] section?
[XDebug]
;; Only Zend OR (!) XDebug

Code: Select all
[Zend]
;zend_extension_ts = "C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "C:\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:

So if you want to use Zend you comment out the whole of the [XDebug] section and if you want to use XDebug you comment out the whole of the [Zend] section.

It is not clear in your post if in fact you have done this.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Apache crashing only with xdubug on

Postby markchicobaby » 27. March 2009 07:41

Yes all of [Zend] is already commented out. This is what is in my php.ini:

Code: Select all
[Zend]
;zend_extension_ts = "C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "C:\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:


I'm currently trying to use the XAMPP debugger, not Zend.
markchicobaby
 
Posts: 3
Joined: 27. March 2009 02:21

Re: Apache crashing only with xdubug on

Postby shrenster » 27. March 2009 18:01

Hi
I have been dealing with problem for the past 5 hours. I tried different versions of Xdebug, tried different IDE(Notepad++). I have finally go it working (debugging my code) on XP.

I'm using the following:-
XAMPP 1.7
Xdeug php_xdebug-2.0.3-5.2.5.dll
UEStudio v9.0

1) First I downloaded the Xdebug file. (php_xdebug-2.0.3-5.2.5.dll). Download the correct one depending on your php version.
2) Place this file in the C:\xampp\php\ext\ folder.

3) Edit c:\xampp\apache\bin\php.ini

comment this out.
Code: Select all
;extension=php_xdebug.dll


Comment out all the Zend items
Code: Select all

[Zend]
;zend_extension_ts = "C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "C:\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:


And set the Xdebug parameters as follows :-

Code: Select all

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts = "C:\xampp\php\ext\php_xdebug-2.0.3-5.2.5.dll"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp


The important line is zend_extension_ts = "C:\xampp\php\ext\php_xdebug-2.0.3-5.2.5.dll".

Make sure it is not commented and it points to the Xdebug file that you have in the php/ext folder under xampp.

Thankfully, this worked for me and hopefully, will save others having to pain-stakingly go through various forums to find the answer. My next step was to try an older version of XAMPP, but now I don't have to. :D
shrenster
 
Posts: 1
Joined: 27. March 2009 17:38

Re: Apache crashing only with xdubug on

Postby markchicobaby » 28. March 2009 01:23

Hey thanks for your findings I'll definitely try it out. Do you have the download link for that version of Xdebug? And do we need the non thread safe version or the thread safe version (I have no idea what the difference here is). The only download page I can find only links to the latest version.

Now my questions.... When you say
Download the correct one depending on your php version.

I notice that you are running XAMPP 1.7.0 (which is PHP 5.2.8 ) but you have the Xdebug file for PHP 5.2.5. So perhaps that is the issue, that the earlier Xdebug file is "more stable" at least in your case? In which case we should actually NOT download the one that matches our PHP version?

Isn't the point of XAMPP that the Xdebug packaged with it should already match the version of PHP shipped?

XAMPP 1.7.0 is packaged with PHP 5.2.8 according to what my phpinfo lists. Could you please confirm via phpinfo() that you also have PHP 5.2.8 as that is what my installation of XAMPP 1.7.0 lists?

Let me know your thoughts...
markchicobaby
 
Posts: 3
Joined: 27. March 2009 02:21

Re: Apache crashing only with xdubug on

Postby tidus532 » 28. March 2009 21:36

I found a solution, you need to use a older version of xdebug (php_xdebug-2.0.2-5.2.5.dll). and disable 2 lines in php.ini:
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="C:\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="C:\xampp\tmp"

The only problem is that the profiler doesn't work then. The cause for this is (i think) that the xdebug dll is for 5.2.5 and not for 5.2.8.
you can use an older version of xampp or compile your own xdebug.dll that is build against PHP 5.2.8 because the xdebug site doesn't provide one for 5.2.8
Maybe i'll try to compile one later on.
tidus532
 
Posts: 1
Joined: 28. March 2009 21:29


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 139 guests