try it this way...since you've specified to the browser that you're
sending HTML then you've got to give it what it's waiting for. "html"


================ paste below this line =====================
#!/usr/bin/perl
# hello.pl -- my first perl script!
print "Content-type: text/html\n\n";

print <<EOF;

<html>
<head><title>A test script</title></head>
<body>
<center><BR><BR><BR><BR><BR>
<font size="+6"><b>Hello, world!</b>
</font>
</center>
</body>
</html>

EOF
;

exit;
============= end of script ====================

daRcmaTTeR


> Here it is:
>
> #!/usr/bin/perl
> # hello.pl -- my first perl script!
> print "Content-type: text/html\n\n";
> print "Hello, world!\n";
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Miark
> Sent: March 28, 2002 8:43 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [newbie] CGI/Perl question
>
>
> It looks like the script runs fine from the command line,
> but isn't browser friendly.  What does your test script
> look like?
>
> Miark
>
>
>
> "Mithrilhall2000" <[EMAIL PROTECTED]> spoke thusly:
>
> > Here's the error message:
> >
> >
> > [Thu Mar 28 22:09:29 2002] [error] (2)No such file or directory:
exec of
> > /var/www/cgi-bin/test.cgi failed
> > [Thu Mar 28 22:09:29 2002] [error] [client 192.168.1.1] Premature
end of
> > script headers: /var/www/cgi-bin/test.cgi
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of daRcmaTTeR
> > Sent: March 28, 2002 8:23 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [newbie] CGI/Perl question
> >
> >
> > What does your log report in the error file as the cause of the
problem?
> >
> > daRcmaTTeR
> >
> > > I changed Apache to run on listen on port 8000 and was wondering
if
> > this
> > > would have any connection to my problem of not being  able to run
cgi
> > or
> > > perl scripts from my browser? Such as:
> > > http://mithrilhall.redirectme.net/cgi-bin/test.cgi
> > >
> > > If I run the cgi or perl scripts from shell they work fine but I
can't
> > get
> > > them to work when calling them from my browser.
> > >
> > > *************************************
> > > *       Mithrilhall  Linux        *
> > > *              Server               *
> > > *          AMD-K2 350MHz            *
> > > * http://mithrilhall.redirectme.net *
> > > *************************************
> > >
> > >
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> > >
> > >
> > >
> >
> >
>
> ----------------------------------------------------------------------
--
> > --------
> >
> >
> > > Want to buy your Pack or Services from MandrakeSoft?
> > > Go to http://www.mandrakestore.com
> > >
> >
> >
> >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> >
>
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>


------------------------------------------------------------------------
--------


> Want to buy your Pack or Services from MandrakeSoft?
> Go to http://www.mandrakestore.com
>


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to