premature end of script headers is usually caused by forgetting to do the
printf( "Content-type: text/html\n\n" );
at the top.
-CJO-
On Thu, 4 Nov 1999, Camelia Nastase wrote:
>Tony Nugent wrote:
>>
>> On Tue Nov 02 1999 at 12:02, "Gaurav Agarwal" wrote:
>>
>> > Hi,
>> > I had trouble setting up httpd properly on my Linux Red Hat 6 system
>> > Actually, everything is okay, except that i am unable to run my cgi scripts.
>> > On running the scripts i get the 500 server error.
>> > and in the logs " Premature end of script headers."
>>
>> There's an error in your cgi script/program. Or at least your web
>> server is complaining about what it is (or is not) doing.
>>
>> > THe script runs fine from terminal ( hence error free)
>>
>> Warning: that's no indication at all that the output from any cgi
>> program will work in it's intended runtime environment.
>>
>> > Also it has the standard line content-type: text/html\n\n
>>
>> Good, it needs to do that, definitely.
>>
>> > Webmaster - prayagonline.com
>> > http://www.prayagonline.com>
>>
>> (I guess we all live on a prayer when we surf the net :)
>>
>> The best idea to cope with this is to do something like
>>
>> tail -f /var/log/httpd/* &
>>
>> then run your cgi program (through a browser) while watching the error
>> messages being added to the error log files as they occur. This way
>> you can track down the source(s) of your problem(s) and fix it(them).
>>
>> Cheers
>> Tony
>> -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
>> Tony Nugent <[EMAIL PROTECTED]> Systems Administrator
>> GrowZone OnLine (a project of) GrowZone Development Network
>> POBox 475 Toowoomba Oueensland Australia 4350 Ph: 07 4637 8322
>> -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
>
>Is there any possibility you've forgotten to close any "print <<EOF"
>statement?
>
>
>--
>Camelia Nastase
>[EMAIL PROTECTED]
>
>
C.J. Oster (Linux Guru/Surge Addict)
----------------------------------------------------------------------
Network Security Manager Unix System Administrator
For BHNet, Bromley Hall WSG, CCSO
Hoover and Associates University of Illinios
[EMAIL PROTECTED] Office: L538, DCL
[EMAIL PROTECTED] (217)265-8427
----------------------------------------------------------------------
108 E. Healy St, #6
Champaign, IL 61820
(217)378-4223
(580)761-6393
PGP: 87D5 4216 43A1 42D6 754D 8F5E 24B3 992A B7A1 F556
"Linux, for people with an IQ above 98" - Bumper Sticker
"Hm, a little big for a cup holder... Why does it say '4x' on it?"