NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[fixed] DBG3.2.3 may crash server if auto prepend is used
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Short sketch of the situation: My laptop acts as my development server as well, easier to take to customers and so on.
It has apache 2, php 4.4.7 and also runs a named so that I can use domain names for my sites when developing at home.
The server has a vhost per website and then a "default" vhost that is used when you request an unknown host or surf to the IP directly.
(This allows me to select a specific site and show customers their site by using the laptops external IP)

This method has always worked perfectly for me, ie no problems with debugging and everything, no matter what the vhost is (including default).
Recently I bought a new laptop with Vista Business on and obviously reinstalled everything (using the old settings etc).
Since then surfing to the default vhost makes the entire apache crash.
Even a one line php script with phpinfo()!
Again: All normal vhosts work perfectly (including the debugger), it's only the default vhost.

I know it is the debug module for sure because of:
    * images and non php files are served without problems
    * The crash report says the crash occurred in the dbg module (d'oh Smile )
    * if i disable the dbg module, the php files work perfectly as wel

Is there a way for me to have the DBG module be more verbose about what exactly goes wrong? The problem is that besides the loglines that the server is restarting, there is nothing logged at all. Php log is clear, apache log is clear etc etc...

Any suggestions?
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Thanks for the overwhelming reply all.

Since debugging is a big part of being able to do my job, this was a serious handicap and I lost a lot of time tracking the issue down.
Seems the problem lies with the auto_prepend_file which some of my vhosts have and others don't.

Somewhere else in this forum I found out that the current debugger version seems to have issues with this and that they are working on it.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Although it shows dbg, it's not necessarily dbg Smile
Please make sure you have all the available Windows Updates and service packs installed.
Then make sure you're working with the most recent version of both PhpED and debugger (5029 & 3.2.3 respectively)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
dmitri,

It is DBG. The crashes do not occur if I either disable the auto_prepend_file-statement or the dbg extension. That leaves little doubt, no?
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
did you check the rest? or just replied to make me have less doubts? Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
I'm not sure what more there is to check?
I just verified it, specially for you (with an apache restart after every modification and an identical page):
- Disable DBG module, enable auto_prepend_file statement for the vhost: everything okay
- Enable DBG: crash
- Remove auto_prepend_file statement: everything okay

Imho, that pretty much rules out anything besides DBG, no?

Screenshot:
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Looks like you still did not read what I replied:
Then make sure you're working with the most recent version of both PhpED and debugger (5029 & 3.2.3 respectively)
I still see no versions that you're working with.
Also, you mentioned that it worked before. It looks like you had different version of php. Is it possible for your to revert to it? something like php 4.4.3 or 4.4.4 will work quite stable.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Yeah, I keep track of the builds you guys release and the first thing I do is install them and upgrade the debugger module.
I'm running PhpED build 5029, DBG 3.2.3, Apache 2.0.59 (Vista) and PHP 4.4.7.
All updates installed.
The "it worked before" was when I was running everything on windows XP (my old laptop).
Other than the OS, the rest of the configuration is completely identical
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
It looks like there is "something" in the Watch Window. Please let know if you find the expression that caused the problem.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
An answer that actually solved my problem! Thanks for looking into it.
I've eliminated all my watch expressions one by one while trying and it finally came down to the following one:
$GLOBALS['site']
(the 'site' part is insignificant, other variable names yielded the same result)

Anyway, glad I know what causes it now, I use PhpED+DBG all day long so it was a real pain in the ***
I hope you get something out of it too.

FYI: My debugger has the default configuration (all allowed, default port and I have JIT enabled on level 1)

Let me know if you require other information.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
sigh, seems that was only a partial solution.

I have removed all breakpoints, watches and so on and the server now crashes every other pageview consistently. So one page correct, one page crash etc... I'm using a file that only contains <? phpinfo(); ?> to test.

Turning off the auto_prepend_file statement fixes this. FYI: It doesn't matter whether the statement is specified in either the php.ini file, or as
php_value auto_prepend_file "filepath"
in the vhost configuration, both have the same result.

If I disable the debugger (comment out the extension), everything works.

Did about 25 tests... perfectly reproducible behavior.

The problem is... I need both to be able to work decently.
Anything else I can try?

edit: on a side note, I forgot to mention that I'm testing by simply visiting the page url via the browser, not by debugging the page via the editor, should that make any difference.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Would you post the content of the file that you added via auto_prepend_file?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[fixed] DBG3.2.3 may crash server if auto prepend is used
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 vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic