I tried your script and it ran fine from shell but it didn't run at all when trying to run it from my browser.
This is how I called it in the browser: http://mithrilhall.redirectme.net/cgi-bin/x2.cgi This is the result from calling it in a browser: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. ---------------------------------------------------------------------------- ---- Apache-AdvancedExtranetServer/1.3.22 Server at Mithrilhall.LinuxServer Port 80 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of daRcmaTTeR Sent: March 28, 2002 9:05 PM To: [EMAIL PROTECTED] Subject: Re: [newbie] CGI/Perl question 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 > _________________________________________________________ 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
