Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Internal Server Error

by vahagn (Initiate)
on Apr 04, 2005 at 11:50 UTC ( [id://444632]=perlquestion: print w/replies, xml ) Need Help??

vahagn has asked for the wisdom of the Perl Monks concerning the following question:

Anyone who knows why a PERL script on a server results in "Internal Server Error" if I have an active FTP or SSH session connected to the account? I'm aware of the fact that the server might be configured in order to block execution while there is an active session, but the problem is that I have another site at the same server, written in the same way, and it works fine even when there is an active FTP session. I can not figure out how the second code is different in implementation than the first one.... Another odd thing is that the pages occasionally result in "Internal Server Error", but if you reload them they work! It's really irritating, since if there was an error in the script it would fail all the time but now it appear sporadic and I can not understand what this depends on. Anyone out there who can give a hint about what might be causing this two kind of errors? Thanks in advance, /V

Replies are listed 'Best First'.
Re: Internal Server Error
by Nevtlathiel (Friar) on Apr 04, 2005 at 12:03 UTC
    use CGI::Carp qw(fatalsToBrowser);
    is also a useful one to try - the error messages will go straight to the browser so you don't even have to go looking elsewhere :)
Re: Internal Server Error
by RazorbladeBidet (Friar) on Apr 04, 2005 at 11:54 UTC
    There should at least be a hint in the webserver error logs. Try checking there and report back on any findings.

    Another possibility is to directly route any STDERR output to STDOUT thus allowing a glimpse of what might be causing the error.

    It might also help to know what OS/Webserver/Perl combo you are running.
    --------------
    "But what of all those sweet words you spoke in private?"
    "Oh that's just what we call pillow talk, baby, that's all."

      Sending any output to STDOUT without sending valid headers will cause an 'Internal Server Error'.

      If you want to try to gain access to what's going wrong, try making sure the first thing you do is:

      BEGIN { print "Content-type: text/html\n\n"; }

      But definately check the websever logs. And knowing the platform is useful, too.

      Personally, I'm lazy, and like using CGIwrap for debugging my CGIs.

Re: Internal Server Error
by Anonymous Monk on Apr 04, 2005 at 23:46 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://444632]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-18 00:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found