Be sure you are using the correct path to PERL on your system.

#!/usr/bin/perl

or

#!/usr/local/bin/perl

-rm-

----- Original Message -----
From: Francesco del Vecchio <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 10:58 AM
Subject: RE: apache error


> Sorry for boring you, but even copying and pasting the source you gave me
I obtain the same error
> :-((
>
> Any help?
>
> Francesco
> --- Bob Showalter <[EMAIL PROTECTED]> wrote:
> > Francesco del Vecchio wrote:
> > > I'm new to apache and linux.
> > >
> > > I'm trying to run the "Hello World" cgi that works perfectly
> > > from terminal but via WebServer I
> > > obtain this error:
> > >
> > > [Fri Mar 14 17:03:11 2003] [error] [client 127.0.0.1]
> > > Premature end of script headers: hello.pl
> > >
> > > Do you have any idea about it?
> > >
> > > the source is the following
> > >
> > > #!/usr/bin/perl -w
> > > print ("ciao\n");
> >
> > A CGI script needs to output a MIME header. At a bare minimum, you need
to
> > add the following:
> >
> >    print "Content-Type: text/plain\r\n\r\n",
> >        "ciao\n";
> >
> > There are two \r\n pairs there because the header must end with a blank
> > line.
> >
> > To do this with the CGI module (recommended), use:
> >
> >    #!/usr/bin/perl -w
> >
> >    use CGI ':standard';
> >
> >    print header('text/plain'),
> >        "ciao\n";
> >
> > If you want to output HTML instead of plain text, do something like
this:
> >
> >     #!/usr/bin/perl -w
> >
> >     use CGI ':standard';
> >
> >     print header,
> >         start_html('Ciao'),
> >         p('ciao'),
> >         end_html;
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to