NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugger - Strange behaviour (phped 3.2.1)


Joined: 14 Feb 2004
Posts: 6
Reply with quote
I'm developping a PHP website that is stored on a Debian server with the following software: Apache/1.3.26 PHP/4.1.2.
However, I develop the software on my own machine running XP using phpED 3.2.1 (build 3239).

I have dbg installed on the Debian server, and have it exporting to clienthost:7869 where dbgListener is listening.
When I try to debug a script, several weird things happen:

1) the headers of the page are displayed texto on the webpage output. Feature or bug? Here is an example:
Code:
X-Powered-By: PHP/4.1.2 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Expires: Mon, 03 Jan 2000 00:00:00 GMT Last-Modified: Sat, 14 Feb 2004 21:12:39 GMT Cache-Control: no-cache, must-revalidate Pragma: no-cache Content-type: text/html

2) when "running" the index.php at the root of my project, that is the only thing it displays: the headers
3) when "running in debugger", that is again what it tries to do, but this time IE (embedded in phpEd) complains that it is not valid XHTML.
4) when trying to "run" or "run in debugger" any other page, nothing happens. I click the button, and well... nothing. The output windows doesn't even get displayed...

I then tried to use the external IE browser and add DBGSESSID=0@clienthost:7869, and that works. phpEd gets control and I can debug... only one page though. If there is a form or a link on the page, clicking it won't open it in the debugger. It looks as if no cookie was set. Isn't there a way to get that happening automatically?

Wabiloo
View user's profileFind all posts by WabilooSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
First of all, make sure you have set up dbg 2.14.10 on the server. Check phpinfo to see if all its settings are okay.

Quote:
1) the headers of the page are displayed texto on the webpage output. Feature or bug?

If you mean Output tab located in the bottom right corner, yes it shows http headers and it is normal.

Quote:
2) when "running" the index.php at the root of my project, that is the only thing it displays: the headers

do you mean that instead of any real output produced by echos, you don't see it on the Output tab ?
If so, check if you have set output handler in php that intercepts all the output and therefore make it bypassing the debugger.

Quote:
3) when "running in debugger", that is again what it tries to do, but this time IE (embedded in phpEd) complains that it is not valid XHTML

I think that this problem is somehow related to 2).
Just check how it goes without debugger and make sure you have set up all the things correctly. I mean apache and php.

Quote:
4) when trying to "run" or "run in debugger" any other page, nothing happens

Check Apache access log to see if any relevant HTTP/GET requests are logged. If you don't see them, check phped project settings, project root URL in particular. It should be in form like http://youserveraddress/
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 14 Feb 2004
Posts: 6
Reply with quote
ddmitrie wrote:
First of all, make sure you have set up dbg 2.14.10 on the server. Check phpinfo to see if all its settings are okay.


Everything seems to be fine. Here is what it returns:
Version 2.14.10
Linked as a shared library.
Dbg security enabled.
Profiler compiled, enabled

debugger.enable_session_cookie On On
debugger.enabled On On
debugger.fail_silently On On
debugger.hosts_allow protected value protected value
debugger.hosts_deny protected value protected value
debugger.ignore_nops Off Off
debugger.JIT_enabled On On
debugger.JIT_host clienthost clienthost
debugger.JIT_level 3 3
debugger.JIT_port 7869 7869
debugger.ports protected value protected value
debugger.profiler_enabled On On
debugger.session_nocache On On
debugger.timeout_seconds 300 300

Quote:
Quote:
1) the headers of the page are displayed texto on the webpage output. Feature or bug?

If you mean Output tab located in the bottom right corner, yes it shows http headers and it is normal.

No, that the output tab in the bottom right corner shows them, fine with me. Here I mean that when the debugger is enabled, every single page in my web browser and in the browser integrated within phpED shows the headers textually at the top (before the content I generate with the php scripts)

Quote:
do you mean that instead of any real output produced by echos, you don't see it on the Output tab ?

That is what I mean yes: in the browser tab or in an external browser, it only shows the headers as text
Quote:
If so, check if you have set output handler in php that intercepts all the output and therefore make it bypassing the debugger.

I'm not sure I understand what you mean... I'm actually debugging code written by someone else, so I don't really know what I should be searching for...

Quote:
I think that this problem is somehow related to 2).
Just check how it goes without debugger and make sure you have set up all the things correctly. I mean apache and php.

When the debugger is disabled, everything is fine and running smoothly the way I want it. The headers are not output to the browser either
View user's profileFind all posts by WabilooSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
okay.
Can you test with a simple script like below ?
<?php
phpinfo();
?>
It it still outputs all headers as text in the browser, you'd switch to another php package. I'd recommend php-4.3.x.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 14 Feb 2004
Posts: 6
Reply with quote
Yes it does output all headers as text.
Unfortunately I don't have control over the php package and our system administrators won't update it as the webserver is a Debian one and php 4.3 is not the one recommended by Debian...

bugger...
View user's profileFind all posts by WabilooSend private message


Joined: 14 Feb 2004
Posts: 6
Reply with quote
That's just what they told me. They are rather picky about that sort of thing so there really is nothing I can do about it. They will upgrade next sometimes in June
View user's profileFind all posts by WabilooSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I just checked again with php-4.1.2 and Apache 1.3.27. Both are compiled from the official sources. I should say that no problem encountered.

Just to make sure, please send me a screenshot.
ddmitrieATnusphereDOTcom.

Thanks.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Debugger - Strange behaviour (phped 3.2.1)
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 1  

  
  
 Reply to topic