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
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 :) | [reply] [d/l] |
Re: Internal Server Error
by RazorbladeBidet (Friar) on Apr 04, 2005 at 11:54 UTC
|
| [reply] |
|
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.
| [reply] [d/l] |
Re: Internal Server Error
by Anonymous Monk on Apr 04, 2005 at 23:46 UTC
|
| [reply] |
|