[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Perl 'die' function?



The reason it is giving you the internal server error is because the script
is printing without declaring the content-type.  It could be any number of
things that cause it--including not finding PERL or whatever.

I.e it could be printing the error
"bash: ./help.cgi: No such file or directory" if you're command interpreter
(the fisr line) is incorrect.

or executing one of the die statments trying to say

"Error: Can't open file for reading: whatever.txt"

Because it doesn't have the content type header like the before mentioned
"Content-type: text/html\n\n" the web server chokes on it.

Two things I woudl try: run it from the command prompt and see what error it
produces.

Second, on the die command, have it print the "Content-type: text/html\n\n"
before the error screen and it will print the error in the web browser.

-k

on 6/13/00 12:26 PM, Mike Fritsch at mfritsch@xxxxxxxxxxxx wrote:

> Heres to the scripts URL if you guys can help:
> http://www.worldometer.org/cgi/help.cgi?region=in&path=../NWG_beta/g1/&verb=
> main
> 
> Thanks
> Mike
> 
> ----- Original Message -----
> From: Jens Kristian Søgaard <jens@xxxxxxxxxxxxxxxxxxxx>
> To: <cobalt-users@xxxxxxxxxxxxxxx>
> Sent: Tuesday, June 13, 2000 10:15 AM
> Subject: Re: [cobalt-users] Perl 'die' function?
> 
> 
>>> Ive got a perl script that keeps getting an internal server. I found out
> it
>>> has to do with the 'die' function. Anyone know what could be causing the
>>> error message?
>> 
>> The purpose of the die() function _is_ to display an error message and
> exit.
>> 
>> You have to post more information, if we are to help. Consider posting a
> link to the whole script (the source code) and a description of, how you
> have set it up.
>> 
>> --
>> Jens Kristian Søgaard,
>> jk@xxxxxxxxxxxx
>> 
>> 
>> 
>> 
>> _______________________________________________
>> cobalt-users mailing list
>> cobalt-users@xxxxxxxxxxxxxxx
>> To Subscribe or Unsubscribe, please go to:
>> http://list.cobalt.com/mailman/listinfo/cobalt-users
> 
> 
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>