Author |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Sat 26 Apr '08 4:34 Post subject: need help with apache and perl in windows |
|
|
hi guys,i am so stuck here,am usein win2k server box,and apache 2.0 and activeperl 5.8.
now comes my problem when i run a webpage in html its loads up just fine.but when i try and run a perl script all i get it code.it just dont want to run perl. I have put in the shebang line #!c:/perl/bin/perl.exe which is the defaut install of perl...pls can some one help me.as am pullin my hair out ere..plus i must point out am very new to all this.so may need talkin to like a baby so it sinks in..Thanks |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sat 26 Apr '08 14:41 Post subject: |
|
|
Do you have in your httpd.conf some like ?
<Directory />
Options FollowSymLinks ExecCGI
AddHandler cgi-script cgi pl
AllowOverride none
.
.
</Directory>
And is c:/perl/bin/ in your windows path ? |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Sat 26 Apr '08 16:00 Post subject: |
|
|
yes i have done this..seems that perl just dont want to to..even done a littlie script with hello world and all that runs is just the code..but it will run a webpage in html ok..seems that perl cant find the path..
Options FollowSymLinks ExecCGI
AddHandler cgi-script cgi pl
AllowOverride none |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sat 26 Apr '08 16:29 Post subject: |
|
|
Again - And is c:/perl/bin/ in your windows path ?
Any info in the Apache error.log ? |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Sat 26 Apr '08 16:35 Post subject: |
|
|
yes i did add this #!c:/perl/bin/perl.exe in my 1st line in my script..i was wounderin if i need to something like that in my apache aswell |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sat 26 Apr '08 16:38 Post subject: |
|
|
Nope.
You still do not answer the questions:
And is c:/perl/bin/ in your windows path ?
Any info in the Apache error.log ? |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Sat 26 Apr '08 16:42 Post subject: |
|
|
oh sorry..yes perl is install in the default place c:\perl\bin and there no error logs.i looked in logs and its says what file run but dont give error.. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sat 26 Apr '08 16:45 Post subject: |
|
|
Your windows Path must look like:
Path = c:\perl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
So no error in /logs/error.log ? |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Sat 26 Apr '08 16:51 Post subject: |
|
|
not sure what you mean about path.i thought you ment where was it install
and i install perl in the default place on my c:/perl
Your windows Path must look like:
Path = c:\perl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
how and where do i see this path you type in.sorry for sound abit think on this matter |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Sat 26 Apr '08 20:52 Post subject: |
|
|
well am still tryin..even as this is startin to get me down in a bad way...
i looked in windows services and i dont see a perl sevice to start..ummmm could this be my problem.. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
|
Back to top |
|
holziusa
Joined: 02 Jan 2008 Posts: 48
|
Posted: Sun 27 Apr '08 1:52 Post subject: |
|
|
hi chillipepper,
if you using latest versions
make sure this is in your httpd.conf file
"ScriptInterpreterSource registry"
worked 4 me even without the path |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Sun 27 Apr '08 3:02 Post subject: |
|
|
steffen
heres my path
c:\perl\site\bin;c:\perl\bin;C:\Perl\site\bin;C:\Perl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
and holziusa the ver are:
Apache 2.0.63 (win32)
Activeperl 5.8
win2k server
i installed apache in the default windows /program files
and perl was install also in default c:/perl
apache server runs my website ok with is in html..so i know the server is workin..but i need to run perl for my bb.
its only perl scripts that will not run.when i try,they only come up in code.. |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Mon 28 Apr '08 1:21 Post subject: |
|
|
am back again.Right guys i think my prob is apache httpd.conf paths so am hopein youe guys can give me the right info to put in..heres my details
website which as my html files are:
c:/website/hobby and they load up ok
my scripts are in my forum software that i want to run and there are at:
c:/webite/hobby/yabb2/cgi-bin/yabb2
could someone tell me where and right paths in my httpf file as this is where i think am goin wrong |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Mon 28 Apr '08 2:10 Post subject: |
|
|
yep i back again.am still tryin guys..seems now am got alittle nearer..now when i try to run my perl script i get error 403 forbidden so i went and look in my apache error logs and this what comes up
Error Options ExecCGI is off in this directory c:/website/hobby/yabb2/cgi-bin/yabb2/yabb.pl
any ideas anyone. |
|
Back to top |
|
chillipepper
Joined: 26 Apr 2008 Posts: 22
|
Posted: Mon 28 Apr '08 7:39 Post subject: |
|
|
wow guys after 2 or 3 days i lost count now..But i got it sorted..i was pullin my hair out but stuck with it..am so happy.. |
|
Back to top |
|