Dreaded Error 500
am 26.08.2006 04:39:31 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 stich used in
knitting.
Can anyone help.
Thanks.
Dave
Re: Dreaded Error 500
am 26.08.2006 05:09:57 von Tintin
"Dave Kelly" wrote in message
news:DvOHg.10396$Qf.1968@newsread2.news.pas.earthlink.net...
>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'd say that either you have incorrect permissions on the script, or you
have FTPed in binary mode from a Windows box and it still has Windows end of
line characters.
>
> I am clueless about perl. So far as I know, perl is a stich used in
> knitting.
There's only one perl and that's the Perl interpreter. In knitting you use
a purl stitch.
--
Posted via a free Usenet account from http://www.teranews.com
Re: Dreaded Error 500
am 26.08.2006 06:34:03 von Dave Kelly
Tintin wrote:
> "Dave Kelly" wrote in message
> news:DvOHg.10396$Qf.1968@newsread2.news.pas.earthlink.net...
>> 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'd say that either you have incorrect permissions on the script, or you
> have FTPed in binary mode from a Windows box and it still has Windows end of
> line characters.
I checked, the permissions on index.cgi is rwxr-xr-x.
I used a hex editor and all the end of lines were of value OA on my hard
drive. To be safe, I uploaded everything to the server using: ncftp ascii *
Still get the same error.
Let me ask this question.
Using this as an example: use sitevariables;
sitevariables.pm is how it exist on disk. Does the fact that it does not
have the extention cause any problems?
>
>> I am clueless about perl. So far as I know, perl is a stich used in
>> knitting.
>
> There's only one perl and that's the Perl interpreter. In knitting you use
> a purl stitch.
See how clueless I am. I don't do pearl, I don't do perl, and I don't
do purl.
Re: Dreaded Error 500
am 26.08.2006 11:25:39 von Tintin
"Dave Kelly" wrote in message
news:%aQHg.1697$bM.1606@newsread4.news.pas.earthlink.net...
> Tintin wrote:
>> "Dave Kelly" wrote in message
>> news:DvOHg.10396$Qf.1968@newsread2.news.pas.earthlink.net...
>>> 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'd say that either you have incorrect permissions on the script, or you
>> have FTPed in binary mode from a Windows box and it still has Windows end
>> of line characters.
>
> I checked, the permissions on index.cgi is rwxr-xr-x.
>
> I used a hex editor and all the end of lines were of value OA on my hard
> drive. To be safe, I uploaded everything to the server using: ncftp ascii
> *
>
> Still get the same error.
Might seem like a stupid question, but does index.cgi only contain the code
you supplied above?
>
> Let me ask this question.
> Using this as an example: use sitevariables;
> sitevariables.pm is how it exist on disk. Does the fact that it does not
> have the extention cause any problems?
When you specify the name of a module with 'use', you leave off the .pm
extension.
--
Posted via a free Usenet account from http://www.teranews.com
Re: Dreaded Error 500
am 26.08.2006 18:46:11 von Dave Kelly
Tintin wrote:
>>>> 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;
> Might seem like a stupid question, but does index.cgi only contain the code
> you supplied above?
'index.cgi' is 394 lines of code.
I posted only that portion because my google searching, while not
offering a solution, seem to indicate that the problem was in this part
of the code. The entire suite of code can be downloaded here:
http://fuzzymonkey.net/cgi-bin/download.cgi?file=signup
Thanks for the feedback.
Dave