For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > August 2006 > Dreaded Error 500









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Dreaded Error 500
Dave Kelly

2006-08-25, 9:56 pm

I have downloaded this file.
http://fuzzymonkey.net/cgi-bin/download.cgi?file=signup

I am getting a 500 internal error when I try to run it on my website
server. The website error log shows. Premature end of script headers:
index.cgi

#!/usr/bin/perl



use CGI();
use CGI::Carp qw(fatalsToBrowser);
use lib "./lib";
use strict vars;
use sitevariables;
use common;
use lang;

package dft;


I googled for Premature end of script headers: index.cgi and find
several mentions. None provided a solution.

I am clueless about perl. So far as I know, perl is a stitch used in
knitting.

Can anyone help.
Thanks.
Dave
mgarrish@gmail.com

2006-08-26, 7:57 am


Dave Kelly wrote:

> I have downloaded this file.
> http://fuzzymonkey.net/cgi-bin/download.cgi?file=signup
>
> I am getting a 500 internal error when I try to run it on my website
> server. The website error log shows. Premature end of script headers:
> index.cgi
>
> #!/usr/bin/perl
>
> use CGI();
> use CGI::Carp qw(fatalsToBrowser);


Are you sure thie CGI::Carp module is installed?

> use lib "./lib";


Are you sure the current working directory when the script runs is the
same as where your code is located, otherwise the lib directory won't
be found. You may need to hard-code the path.

Matt

Dave Kelly

2006-08-26, 6:57 pm

mgarrish@gmail.com wrote:
> Dave Kelly wrote:
>
>
> Are you sure thie CGI::Carp module is installed?


No I am not. How do I determine if my server has this installed? My IP
server is EV1.

>
> Are you sure the current working directory when the script runs is the
> same as where your code is located, otherwise the lib directory won't
> be found. You may need to hard-code the path.


Reasonably sure. I can log on using 'ncftp' and see the directory in
'cgi-bin'. I try hard coding the path.
> Matt
>


Thanks for the feedback.
Dave
mgarrish@gmail.com

2006-08-26, 6:57 pm


Dave Kelly wrote:

> mgarrish@gmail.com wrote:
>
> No I am not. How do I determine if my server has this installed? My IP
> server is EV1.
>


If your host doesn't provide a list of installed modules, see the
perlfaq3 "How do I find which modules are installed on my system?"
(perldoc -q install)

>
> Reasonably sure. I can log on using 'ncftp' and see the directory in
> 'cgi-bin'. I try hard coding the path.


You would assume that makes sense since it's relative to your script,
but just because the script is in your cgi-bin doesn't meant that is
where the server is launching it from (i.e., the cwd of the shell it's
run in might be some other path). I can't think of any instances where
I've been able to use a relative path to reference a personal library
from a CGI script, but that may not be your experience.

Matt

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com