oh man, I've seen this "premature end of script..." error before but I
can't remember how I exactly fixed it.

I did a search on altavista for
http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&q=%22premature+end+of+script%22
and I found this from http://www.interspeed.net/faqcgi.html#7

[...]
7. Why am I getting a "Premature end of Script Header" or other errors?

            The major error you will see when calling your script will
be the infamous
            "Premature end of script Headers" error. To fix this, check
the following:

            - Make sure that you are calling Perl correctly
(#!/usr/local/bin/perl) many
            times scripts call it with a (!#/usr/bin/perl). You will
find this line usually at the
            very top of your script.

           - Be sure that you uploaded your cgi script(s) in ASCII mode,
NOT binary. CGI
            scripts are text files that need to be uploaded in ASCII
format.
[...]

I hope this helps.

later,
kervin

Ken Dalton wrote:
> 
> I've just installed Redhat Linux 6.0.
> Here is the error I am still getting...
> 
> I set the ScriptAlias , Addhandlers, even execCGI and set the permissions
> to all the directories and scripts to 755 or 777
> 
> When i type in netscape http://localhost/~ken/cgi-bin/env.cgi
> The browser says something along the lines of 'premature end of script
> headers'
> 
> (i did restart apache after I made any changes)
> 
> I've spent hours and hours trying to get it to work with the same problem
> each time..
> 
> The script runs fine off the command line by the way..
> Also ,I tried it logged in as root and user KEN. No luck..
> 
> For some reason it just doesnt want to run the .pl or .cgi scripts..
> The scripts work fine on other servers I might add.
> 
> Any suggestions ???

Reply via email to