You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Mark Allman <ss...@hotmail.com> on 2000/03/01 18:45:04 UTC
os-windows/5827: Premature end of script headers - for all gcc compiled programs
>Number: 5827
>Category: os-windows
>Synopsis: Premature end of script headers - for all gcc compiled programs
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Wed Mar 01 09:50:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: ssppaarrkyy@hotmail.com
>Release: Apache 1.3.12
>Organization:
apache
>Environment:
Win 98, VC 6.0, gcc 2.952
>Description:
I have a *very* basic CGI script written in C:
----
#include <stdio.h>
int main(void)
{
printf("Content-Type: text/plain\n\n");
printf("Wibble!");
return 0;
}
----
The problem is very simple - if I compile this with VC 6.0, and then attempt to execute the script via a web browser/apache, it works, and gives the expected output (Wibble! :o). However, if I compile it using gcc, it gives an internal server error, and the logfiles report "Premature end of script headers".
I would think that the executable produced by gcc was faulty, but executing both programs from the command-line gives correct results (the http header, wibble), and it is only when attempting to use the gcc compiled program through apache that it fails.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]