Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Odd behavior: CGI and warnings

by mandog (Curate)
on Oct 30, 2003 at 03:24 UTC ( #303187=note: print w/replies, xml ) Need Help??

in reply to Odd behavior: CGI and warnings

Hello MichelleM

My guess is that either you access your undeclared variable before:

print "content-type: text/html\n\n";

... or that you have troubles with buffering. Generally error messages are flushed right off and other printing is buffered

This problem would manifest itself in the error log as something line "Premature end of Script Headers "

This may be clearer if you run your script at the command prompt and your warning comes before your header

You can turn off buffering by setting  $|=1

There is a really good nodo on buffering problems: but I can't find it... Suffering from Buffering

update: there is some apache 2.0 buffering discussion here

Replies are listed 'Best First'.
Re: Re: Odd behavior: CGI and warnings
by michellem (Friar) on Oct 30, 2003 at 15:03 UTC
    Actually, in this case, it comes after the headers. And running my script at the command line was how I figured out about the issue of warnings, because I was so puzzled. But thanks for the details on buffering, that comes in handy.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://303187]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2021-01-20 03:48 GMT
Find Nodes?
    Voting Booth?