NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugger stops on All errors


Joined: 19 Mar 2005
Posts: 7
Reply with quote
I have a problem when I debug remotely on my server.

The server is running Red Hat Linux 3 with PHP 4.3.11

The debugger works fine locally but when I try to debug a script remotely it stop at every error even with the Debugger Error Level set to 1.
I'm sure this didn't happen before and has only started since a recompiled the server with PHP running as a CGI.

The error in the Apache log is: Premature end of script headers: /home/user/public_html/filename.php

If I correct the error in the script it moves on but stops at the next error. The errors it stops on are stuff like Undefined Variable, so this is a real pain.

Your help is very much apprecated.

Neil Westlake
View user's profileFind all posts by Neil WestlakeSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
As far as I see you're encontering problems with running PHP as CGI executable and NuSphere PHP Debugger is not involved.
Below are my recommendations:

a) if possible switch back to Apache module, it's known to work stable (at least if multithreading is not used, for instance apache pre-fork works pretty stable)
b) if CGI is the only way for you, please learn CGI first. <theory begin>In short, CGI application receives input as environment variables and returns results through its output pipe. Server that runs CGI application expects two major parts in the output: headers and body. Headers part contains one or many headers separated by line ends (0xA or 0xD,0xA) Body is separated from the headers with just one additional empty line. If for whatsoever reason CGI application does not return headers or does not respond for certain time, server returns with one of errors 5xx (500-599) <theory end>. Now, take a look at your script. If it produces an error and outputs this error text before headers, server can't process this output and returns with Premature end of script headers. I'd direct errors to error log instead of the output. See relevant php.ini settings.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Debugger stops on All errors
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