Front page | perl.beginners |
Postings from July 2003
From: Unknown Sender
July 25, 2003 01:15
Message ID: 3F20E37C.email@example.com
I am trying to run a perl cgi script for the first time... under linux
redhat8. my apache works fine. localhost gives me the test page. I have
this script (very usual)
# hello.pl - My first CGI program
print "Content-Type: text/html\n\n";
# Note there is a newline between
# this header and Data
# Simple HTML code follows
print "<html> <head>\n";
print "<title>Hello, world!</title>";
print "<h1>Hello, world!</h1>\n";
print "</body> </html>\n";
I have put this file at /html and /cgi-bin as a pl file as well as a cgi file... no way.. netscape displays the text content of the file, but does not execute the script.
so it is just printing the whole textual content of the file...
I have chmod 755 the file.. so... what do I have to change and where... please.. if I place the script
at /cgi-bin then it gives me an error msgs forbiden.... so?