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

Re: Premature End of Script Headers Reasons?

by Your Mother (Chancellor)
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-07-04 02:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls