httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel" <gabesdura...@yahoo.com.br>
Subject [users@httpd] Run CGI
Date Sun, 27 Apr 2003 15:35:44 GMT
I install Apache 2.0 on Windows 98 Plataform and I try to run a CGI  that was writen in C on
it, but browser always shows me this error "Internal server error" and log error file shows
"premature end of script headers". The code is in cgi-bin folder and the httpd.conf is with
default parameters.
the code is that:
--------------------------------------------------------------------------------------------------------------
#include <stdio.h>

void main()
{
 printf("Content-type: text/html\n\n\n");
 printf("<TITLE>Home Page do Gabriel</TITLE>\n");
 printf("<HTML>\n");
 printf("<BODY>\n");
 printf("<CENTER><H1>HELLO WORLD</H1></CENTER>\n");
 printf("</BODY>\n");
 printf("</HTML>");

}
-----------------------------------------------------------------------------------------------------------------
 The code me that:
-----------------------------------------------------------------------------------------------------------------
Content-type: text/html


<TITLE>Home Page do Gabriel</TITLE>
<HTML>
<BODY>
<CENTER><H1>HELLO WORLD</H1></CENTER>
</BODY>
</HTML>
------------------------------------------------------------------------------------------------------------------
I think the code is right but I''m not sure if the httpd.conf is OK. What can I do?

Regards.

Gabriel Durante
Mime
View raw message