httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Knipe" <sav...@savage.za.org>
Subject Re: [users@httpd] Run CGI
Date Sun, 27 Apr 2003 15:59:43 GMT
Just tested it on my FreeBSD system, and it works... 




--
me

  ----- Original Message ----- 
  From: Gabriel 
  To: users@httpd.apache.org 
  Sent: Sunday, April 27, 2003 5:35 PM
  Subject: [users@httpd] Run CGI


  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