Thank you, Thank you, Thank you!!

I did everything you said and it worked. So, I wanted to find out what
specifically the problem was. Turns out it was the absense of the -w switch
on the shebang.

Thanks again,
Patrick

> Gary Stainburn wrote:
>
> Hi Patick,
>
> You say you've set the permissions for the dir and the script to 755.
> Have you checked the permissions for the parent directories?
>
> Also, put the '-w' on the perl line, and 'use strict'.
>
> lastly,  put the following line as the 1st statement in the script
>
> print STDERR "\nGot this far\n";
>
> This will put the text into the server's error log if the script gets
> run.  If the line doesn't appear, you've got a configuration problem.
>
> Definitely lastly, remove/rename the script and see if it makes any
> differences.
>
> Gary
>
> On Wednesday 02 May 2001  6:17 am, J. Patrick Lanigan wrote:
> > I am getting an "Internal Server Error" returned to my browser. The
> > error log shows the following:
> >
> > "[Wed May  2 00:04:39 2001] [error] [client 192.168.0.10] Premature
> > end of script headers: /path/to/filename"
> >
> > I have set the directory and file to 755 and the correct ownership. I
> > have tried a couple simple scripts and gotten the same error:
> >
> > _First_Script_
> >
> >     #!/usr/bin/perl
> >     print "Content-type: text/html\n\n";
> >     foreach $key (keys %ENV) {
> >          print "$key --> $ENV{$key}<br>";
> >     }
> >
> > _Second_Script_
> >
> >     #!/usr/bin/perl
> >
> >     print "Content-type: text/html\n\n";
> >     print "<html><body><h1>Hello World!\n</h1></body></html>";
> >
> > Any ideas would be appreciated,
> > Patrick

Reply via email to