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] Premature end of script headers
Date Sat, 26 Apr 2003 16:12:50 GMT
Hi, 

I'm tring to run my first CGI in C language. Of course it's Hello World. The code is that:

#include <stdio.h>

int main()
{
 printf("Content-type: text/html\n\n");
 printf("<HTML>\n");
 printf("<BODY>\n");
 printf("<CENTER><H1>HELLO WORLD</H1></CENTER>\n");
 printf("</BODY>\n");
 printf("</HTML>");

 return 0;
}

when I try to run it the browser shows INTERNAL SERVER ERROR
And the error log file shows Premature end of script headers

I think the code is ok. 
What can I do to fix that problem? 
Regards

Gabriel Durante
Mime
View raw message