Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache and linux 2

Status
Not open for further replies.

mover50

Programmer
Aug 3, 2004
77
US
I have installed Apache as my web server on linux and trying to use a perl script with cgi.

I am somewhat of a newbie with Apache, linux and perl.

The Apache seems to be ok but I get a file not found when I try to run the perl script.
The url I use is;


hyper//localhost/home/mover50/Linux/chap03/example16

(with hyper actually being http:)

That is where the script file is located and it looks like this:

#! /usr/bin/perl
# The HTML tags are embedded in the here document to avoid using
# multiple print statements
print <<EOF; # here document in a CGI script
Content-type: text/html
<HTML><HEAD><TITLE>Town Crier</TITLE></HEAD>
<H1><CENTER>Hear ye, hear ye, Sir Richard cometh!!</CENTER></H1>
</HTML>
EOF

How do I get this to work? Any help would be most appreciated.

Thanks,

Kent
 
Yes, when the instructions say to do it a certain way, and you don't do it that way, you shouldn't be too suprised when it doesn't work

Yep, for sure. The main problem was that the code I tried was coded in the book and also on a cd for download. The cd copy did not have the spaced line in it and that was the one I was using.
Also in the book, the spaced line was made to look like more of separation for clarity bewtween the process. Each line has an explanation to it, the spaced line did not, making it appear, to me anyway, irrelevant. So actually there were no explicit instructions to do it exactly like this with the line, after all when it is free form, spaces are supposed to be irrelevant. Now I know otherwise, thanks to the help on this board.

Regards,

Kent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top