Hi there,

On Tue, 19 Dec 2000, Darren Duncan wrote:

> I have been having a problem with my scripts during the where I 
> periodically get a Netscape 4 error saying "Document contains no 
> data" when they run under mod_perl, but not with the same script 
> under CGI.

Is this only on Netscape 4?

That message often means either bad HTML or a server crash.  Have you
looked in the error_log?  If you can't make sense of it, connect to
the server using

telnet my.host.wherever 80

and then say

GET /your/troublesome/uri HTTP/1.0

followed by two returns and look at the output.  It's instructive if
you just say "GET / HTTP/1.0" (again followed by two returns).

When something fishy happens then it's time to look in the error_log.
When I'm debugging I usually stop the server, rename the error_log to
something like error_log.2000.12.20, then restart it.  That way apache
creates a new, empty log and I can follow everything that happens from
the moment I start the server without wading through reams of output.

Wouldn't you be better off using the request object methods to send
your headers?  The Eagle Book will tell you all about it.  For debug,
if there's a server on port 80 listening to real-world requests and I
had no other machine to play with I'd want to set up another Apache
for debugging which listens on another port, above 1024.  That way I
can crash the server (almost) all I want without hurting real users.
It's all in the Guide.  Sorry, have to drive 1000 miles North now...

73,
Ged.

Reply via email to