[102212] in RedHat Linux List
RE: Internal HTTP ERROR.
daemon@ATHENA.MIT.EDU (Charles Galpin)
Tue Dec 1 22:08:08 1998
Date: Tue, 1 Dec 1998 22:05:20 -0500
From: Charles Galpin <cgalpin@lighthouse-software.com>
To: "redhat-list@redhat.com"@smtp3.erols.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
aromes
I believe you are going about this the wrong way.
Here is what I believe you should be doing
1. Make sure apache is configured properly for cgi scripts
2. Then, and only then try get "fancier" scripts working
3. Learn some perl
Ok, so please accomplish number 1 first.
Here is a ****SIMPLE**** cgi script that relies on nothing else, and takes
no arguments. It can simply be called from lynx (no html needed ) with
http://localhost/cgi-bin/hello.pl
please do the following
1. copy and paste the following as is in a file called hello.pl in your cgi
bin dir
2. make it executable
chmod +x hello.pl
3. test from the command line
./hello.pl
you should see an html page generated, with NO ERROR messages
4. now try with lynx
http://localhost/cgi-bin/hello.pl
you should get a simple page with a title, heading and environment variable
values printed out.
5. report back to us. :)
---- start hello.pl --- CUT HERE ------
#!/usr/bin/perl
print <<"endhead";
Content-type: text/html
<HTML>
<HEAD>
<TITLE>Hello World</TITLE>
</HEAD>
<BODY>
<H1>Hello World</H1><PRE>
endhead
foreach $env (keys %ENV) {
print sprintf("%-20s = %s\n", $env, $ENV{$env});
}
print <<endtail;
</PRE>
<HR>
</BODY>
</HTML>
endtail
---- end hello.pl --- CUT HERE ------
-- Charles Galpin <cgalpin@lighthouse-software.com>
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.