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 stich used in
knitting.

Can anyone help.
Thanks.
Dave
Tintin

2006-08-25, 9:56 pm


"Dave Kelly" <davelly@earthlink.net> 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

Dave Kelly

2006-08-26, 3:57 am

Tintin wrote:
> "Dave Kelly" <davelly@earthlink.net> wrote in message
> news:DvOHg.10396$Qf.1968@newsread2.news.pas.earthlink.net...
>
> 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?

>
>
> 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.
Tintin

2006-08-26, 3:57 am


"Dave Kelly" <davelly@earthlink.net> wrote in message
news:%aQHg.1697$bM.1606@newsread4.news.pas.earthlink.net...
> Tintin wrote:
>
> 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

Dave Kelly

2006-08-26, 6:57 pm

Tintin wrote:

[color=darkred]
> 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
Sponsored Links







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

Copyright 2008 codecomments.com