Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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


Comment on Re: Odd behavior: CGI and warnings
Select or Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-10-02 05:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls