Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Premature End of Script Headers Reasons?

by Your Mother (Canon)
on May 06, 2003 at 18:51 UTC ( #255988=note: print w/ replies, xml ) Need Help??


in reply to Premature End of Script Headers Reasons?

There's some good info above for why things go wrong. And trouble shooting advice from the command line. But CGIs often behave very differently from the command line b/c of permissions or even paths.

My favorite trouble shooting tool is use CGI::Carp like so use CGI::Carp qw(fatalsToBrowser); Usually, that will identify the problem to you immediately (you can always check your error logs too depending on how they're configured but I like the module better).

Do not add this into a production script. It can give away functional details about the CGI or your system to potentially malicious users. You could copy the CGI to a new name (and path?) and set it to only accept a particular user or local connection and then add it. Then just run it till it dies and spits out the reason and not just a generic 500. Make sure you have good error catching routines in your script too to ensure the best information in the die'ing.


Comment on Re: Premature End of Script Headers Reasons?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2014-12-19 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls