Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 83006 invoked by uid 500); 26 Apr 2003 16:19:18 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 82990 invoked from network); 26 Apr 2003 16:19:18 -0000 Received: from spitfire.velocet.net (216.138.223.227) by daedalus.apache.org with SMTP; 26 Apr 2003 16:19:18 -0000 Received: from mail.gej-it.com (gej-it.com [216.138.220.213]) by spitfire.velocet.net (Postfix) with ESMTP id 02C534B7D7B for ; Sat, 26 Apr 2003 12:19:21 -0400 (EDT) Received: from jeff ([192.168.0.4]) by gej-it.com ([216.138.220.213]) with SMTP (MDaemon.PRO.v6.7.7.R) for ; Sat, 26 Apr 2003 12:18:16 -0400 From: "Jeff Cohen" To: Date: Sat, 26 Apr 2003 12:19:12 -0400 Message-ID: <000501c30c0f$93790310$0400a8c0@gejit.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: <001501c30c0e$b171b340$d0a7fea9@durante> X-MDRemoteIP: 192.168.0.4 X-Return-Path: support@gej-it.com X-MDaemon-Deliver-To: users@httpd.apache.org X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] Premature end of script headers You are missing the shebang line at the beginning of the script. It should look something like that: #!/usr/perl/bin/perl if you are using *nix system. If you are running on win32 system: #!c:\perl\bin\perl.exe You must "tell" the script where is the application to run it from is located. Just change the path to where perl.exe is located. All the best, Jeff Cohen -----Original Message----- From: Gabriel [mailto:gabesdurante@yahoo.com.br]=20 Sent: Saturday, April 26, 2003 12:13 PM To: users@httpd.apache.org Subject: [users@httpd] Premature end of script headers Hi,=20 =A0 I'm tring to run my first CGI in C language. Of course it's Hello World. = The code is that: =A0 #include =A0 int main() { =A0printf("Content-type: text/html\n\n"); =A0printf("\n"); =A0printf("\n"); =A0printf("

HELLO WORLD

\n"); =A0printf("\n"); =A0printf(""); =A0 =A0return 0; } =A0 when I try to=A0run it the browser shows INTERNAL SERVER ERROR And the error log file shows Premature end of script headers =A0 I think the code is ok.=20 What=A0can=A0I do to fix that problem?=A0 Regards =A0 Gabriel Durante --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org