Re: CGI Problems

by "The Web Center, Inc." <admin(at)webctr.com>

 Date:  Thu, 22 Feb 2001 07:49:28 -0500
 To:  <hwg-servers(at)hwg.org>
 References:  webstore
  todo: View Thread, Original
print "content-type: text/html\n\n";

That works.  The \r is a Windows thing and is not needed in an
Apache environment no matter what OS the web server is on.

Darrell

----- Original Message -----
From: "Fred Fillon" <fillon(at)webstore.fr>
To: "Apache" <apache(at)lec.co.uk>; <hwg-servers(at)hwg.org>
Sent: Thursday, February 22, 2001 4:24 AM
Subject: RE: CGI Problems


Hi there,


to be sure everything is ok try this :
directly execute form bash your cgi
"If we type /usr/bin/perl /home/httpd/cgi-bin/first.pl on the
linux box all"
instead do this
/home/httpd/cgi-bin/first.pl
(you will be sure that perl invocation is correct)
if this works

instead of
print "Content-type: text/html\r\n\r\n";
use the header function
(because I think text/html\r\n\r\n is wrong the right should be
text/html\n\n, but header contains the right one !)


#!/usr/bin/perl
##################################################################
#####
#                  Webstore Les CyberBoutiques
#                 =============================
#
# Description : Exemple de Formulaire perl
# Dev         : Fred
# Date        : 04/01/01
##################################################################
#####
use CGI qw /:standard/;
print header();
print "Hello world";
##################################################################
#####





-----Message d'origine-----
De : owner-hwg-servers(at)hwg.org
[mailto:owner-hwg-servers(at)hwg.org]De la
part de Apache
Envoy� : jeudi 22 f�vrier 2001 09:21
� : 'hwg-servers(at)hwg.org'
Objet : CGI Problems


Hi,

We are running a RH6.2 Server with Apache 1.3.12, all page serving
seems to
be working fine.

The ScriptAlias setting is set to "/home/httpd/cgi-bin"

the perl file is located in /usr/bin/

we have the following script called first.pl located in the
/cgi-bin dir:

#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";
print "Hello, World";

we have issued a chmod a+x first.pl to make sure the permissions
are ok.

If we type /usr/bin/perl /home/httpd/cgi-bin/first.pl on the linux
box all
is ok and working

if we then open a browser (ie5 on win) and type

http://212.240.214.5/cgi-bin/first.pl

we get a

Internal Server Error
The server encountered an internal error or misconfiguration and
was unable
to complete your request.
Please contact the server administrator, billy@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/1.3.12 Server at http://212.240.214.5 Port 80

i think i have included all the info, what have i missed to keep
getting
this error?

Any help greatly recieved

Kindest Regards

Billy Walton
----------------------------------------------------------
----------------------------------------------------------

Billy Walton
Systems Engineer

Lec Refrigeration plc
Shripney Road
Bognor Regis
PO22 9NQ

Email : Billy(at)Lec.co.uk
Tel : 01243 863161 ex 409
Mobile : 07771 546360
----------------------------------------------------------

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA