Dreaded Error 500
am 26.08.2006 04:42:58 von Dave Kelly
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
Re: Dreaded Error 500
am 26.08.2006 13:24:42 von mgarrish
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
Re: Dreaded Error 500
am 26.08.2006 18:32:52 von Dave Kelly
mgarrish@gmail.com wrote:
> 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?
No I am not. How do I determine if my server has this installed? My IP
server is EV1.
>> 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.
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
Re: Dreaded Error 500
am 26.08.2006 20:45:52 von mgarrish
Dave Kelly wrote:
> mgarrish@gmail.com wrote:
> > 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?
>
> 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)
> >> 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.
>
> 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