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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem installing Perl - getting code instead of 'hello world'

Status
Not open for further replies.

RexJacobus

Programmer
Dec 10, 2001
47
NZ
I am trying to install Perl on my PC but am falling at the first hurdle. I hope this is something obvious that anyone with experience can tell me what I'm doing wrong.

I have already installed appache and that seems to work.
I have downloaded and kicked off ActivePerl-5.8.8.819-MSWin32-x86-267479.msi
During install I chose to all Perl to the environment variable.
I also chose to create the perl file extension.
Perl.exe lives in /usr/bin/perl.exe which I think is pretty standard.
I have my own cgi directory so I commented out #ScriptAlias /cgi-bin/ "E:/Apache2/cgi-bin/" in the appache config

THE PROBLEM
When I run the standard instead of getting an html page saying 'hello world' I get the code printed out:

#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "hello world cgi";

What is going wrong?

jim
 
Perl.exe lives in /usr/bin/perl.exe which I think is pretty standard.

On windows the standard path to perl is:

c:/perl/bin/perl.exe

note: the forward slashes are OK on windows

The code being printed out means the cgi-bin is not configured to execute scripts. Ask on the apache forum how to configure your version of apache to execute scripts in the cgi-bin. Or google for an apache tutorial.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Thanks for pointing me in that direction.

In the path, I had used a 0 instead of an 0 in the DocumentRoot of the apache config.

Whoever thought of having a letter and a number shaped exactly the same has a lot to answer for.

jim

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top