You hit the nail on the head !!!
The script was on my Windows machine ,I am on a network so I transferred
the file over to Linux and set the permissions.
In turn that caused the lines to have an extra character at the end of each
line (which I couldnt see) and that caused the error.
I noticed this when changing one of the lines in the script..
Now ,after taking out these characters, it works fine.
What a headache !!!
Ken
At 06:04 PM 6/21/99 -0700, you wrote:
>Post your script. Or, if it is large, just email it me.
>
>But before you do...did you create this script on a DOS/Windows
>machine? If so, your problem may be extra linefeed (or is it carriage
>return) characters.
>
>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 ???
>
>--
>My public encryption key is available from
>www.az.com/~drysdam/crypt/rysdam.gpg.html
>and of course www.keyserver.net
>