Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Perl 500 Internal Server Error

by mfriedman (Monk)
on Oct 28, 2002 at 22:02 UTC ( #208623=note: print w/replies, xml ) Need Help??

in reply to Perl 500 Internal Server Error

This type of thing usually happens if the script dies unexpectedly before sending the headers. I'm not very familiar with Bugzilla, so I don't know what would necessarily be causing that. Because you mentioned it only happens occasionally, it will likely be a difficult problem to track down. Does Mozilla do any logging of its own? If so, you might want to turn it on and set it to the highest available level. If not, you may want to go through the code and print status messages to STDERR. Those will go to your error log.

And, of course, you might have better luck asking the Bugzilla people themselves. They might have encountered this problem before. Do they have a mailing list or discussion board (or Bugzilla Bugzilla :) )?

Replies are listed 'Best First'.
Re: Re: Perl 500 Internal Server Error
by Massyn (Hermit) on Oct 29, 2002 at 02:23 UTC

    You're spot on, something else is causing it. In my experience, I found that the print "content-type: text/html\n\n"; script has to be my second line of the script, right after #!/usr/bin/perl, as I will mostly catch anything else after that.

    Run the perl script manually, and look at the output. See if anything obvious pops up. Secondly, change your code, and look at anything between the start of the script and where you have the print "content-type: piece.

    There are only so many things that can cause a CGI to crash. The most difficult ones, is when a script does something, it fails, and you don't do any error checking on that. That will keep you busy for a while, especially if you start dealing with DBI's, where you get database errors before you even print the display out.

      Thank you both for replying. I will try those suggestions to see if it helps. It may take a little while since I can't seem to re-create it at will, but I'll post back with my findings. Thanks again!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2021-06-25 10:24 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (135 votes). Check out past polls.