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

where is the PERL Interpereter location in Apache running on WIndows? 1

Status
Not open for further replies.

kevinpham

Programmer
Dec 21, 2001
32
US
Hi,
I just installed Apache in my Win2000 comp and trying to run some sample cgi scripts. But i keep getting the 500 errors. I think it's because of the path. Those programs work fine in Unix (with same apache version)
My installed Perl is in C:/perl

I tried those paths:
#!C:/perl (unix style)
#!C:\perl (Win32 style)
but found no lucks

Do any one knows where the path should be ( i have activePerl 5.6 installed)

thanks
P.S Hope someone would know cheer
kevin
 
If you can type 'perl -v' at a command prompt and get the version information for your perl installation, then the perl executable is in your path. Given, that, all you need on the first line of you script is
#!perl


If the perl executable (interpreter) is not in your path, then use your 'find' utility to find 'perl.exe' and put the fully qualified path in the first line. Something like,
#!c:\perl\bin\perl

HTH If you are new to Tek-Tips, please use descriptive titles, check the FAQs,
and beware the evil typo.
 
Thanks for the advice, but now it would say error 403 instead of the error 500. Ironically, how do we change file permission in Windows to get rid of the 403 error message???

This drives me crazy cheer
kevin
 
As you are using Apache on a Windows box, look for the following line and make sure it's uncommented:

ScriptInterpreterSource registry

This will then run the perl interpreter from the path setup by ActivePerl on install from the registry. It then means you don't have to doctor the shebang line, thus enabling you to safely port scripts between Linux and Windows boxes.

HTH,
Barbie. Leader of Birmingham Perl Mongers
 
Barbie: great piece of advice! I was wondering about the problem of having to change the shebang line for testing on my local machine and then uploading to the live site. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
i hope this will solve your problem. i'm also using Apache under Windows. this is what i wrote...

#!/Perl/bin/perl;

it do work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top