• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

mod_perl + Apache (perl install on apache 2...)

dc_firedrake

Limp Gawd
Joined
Nov 3, 2001
Messages
291
Alrighty....

I can't quite seem to figure out how to install Perl onto Apache2...

My server is running Windows Server 2003 [Enterprise] and I have Apache2 installed, running, and working with PHP. I have ActivePerl installed but I can't seem to find anything that really tells me how to get ActivePerl and Apache to talk to eachother.

I do have IIS 6 on the same server working with everything (PHP, MySQL, and Perl) but I would much rather use Apache.

I have all the files as far as I know... I have entered

"LoadFile "C:/perl/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so "

into the LoadModule section and added the "index.pl" to the DirectoryIndex section... I'm not sure but I thought i also had to add another section like this:

PerlModule Apache2
PerlModule Apache::compat
PerlModule ModPerl::Registry
PerlModule Apache::response

Apache starts up fine with no errors but doesn't interpret .pl files (instead of showing a page it shows the source code)

Any suggestions?

Thanks
«SK»
 
in your httpd.conf you add a line,

PerlModule ModPerl::Registry

Then you have to declace which directory mod_perl scripts will run in. Something like


<Location /perl>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
</Location>


Or you can use the <Directory> directive.
 
Originally posted by pyromania
in your httpd.conf you add a line,

PerlModule ModPerl::Registry

Then you have to declace which directory mod_perl scripts will run in. Something like


<Location /perl>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
</Location>


Or you can use the <Directory> directive.

Okies... Great, I modified the code to this:
Code:
<Directory />
    Options FollowSymLinks ExecCGI
    AllowOverride None
</Directory>
PerlModule Apache2
PerlModule Apache::compat
PerlModule ModPerl::Registry
PerlModule Apache::Response
<Files ~ "\.(pl)$">
SetHandler perl-script
PerlHandler ModPerl::Registry
</Files>

So it seems to recognize the .pl files *yay* BUT it wont let me see them -.-
Instead of just seeing the source code for the .pl files I get a "403 Error: Forbidden" -_-
And the file is set to 777
The error is here: http://creo.ath.cx/index.pl
 
In the <Files> Directive you have to have the Options +ExecCGI. The scripts won't run without it.
 
Originally posted by pyromania
In the <Files> Directive you have to have the Options +ExecCGI. The scripts won't run without it.

Ok... I am really peeved at this now, too bad I am too week from sitting here for the past 32 hours to do dissasemble my case and smash my HDD around a bit -_-

I added the line... now the code looks like this
Code:
<Directory />
    Options FollowSymLinks ExecCGI
    AllowOverride None
</Directory>
PerlModule Apache2
PerlModule Apache::compat
PerlModule ModPerl::Registry
PerlModule Apache::Response
<Files ~ "\.(pl)$">
SetHandler perl-script
PerlHandler ModPerl::Registry
</Files>

But not it's a "500 Error, Internal Server Error" -_-
So I guess it's still recognizing it but not able to translate it properly?

I really do hate having to ask so many questions and seem so dependent but I really don't have time to figure it out on my own since I have to have 3 sites up and hosted for my "employers" to review by Monday -.-

Thanks
«SK»
 
Ok what about this, instead of using Files use FilesMatch

Code:
<Directory />
 DirectoryIndex index.pl


<FilesMatch "*.pl">
   SetHandler perl-script
   PerlHandler ModPerl::Registry
   Options +ExecCGI
</FilesMatch>
</Directory>

This is how I setup mod_perl, and its always worked for me.
 
Originally posted by pyromania
Ok what about this, instead of using Files use FilesMatch

Code:
<Directory />
 DirectoryIndex index.pl


<FilesMatch "*.pl">
   SetHandler perl-script
   PerlHandler ModPerl::Registry
   Options +ExecCGI
</FilesMatch>
</Directory>

This is how I setup mod_perl, and its always worked for me.

Hrmmm... Well that works too... but still a 500 error -.- I'm guessing it's not that little snipet of script but I don't know what it could be... this is the code that I have in the httpd.conf file pertaining to PERL:

Code:
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so

LoadFile "C:/perl/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so

LoadModule php4_module c:/php/php4apache2.dll

#
# ExtendedStatus controls whether Apache will generate "full" status

and then further down:
Code:
# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
directoryindex index.pl

<FilesMatch "*.pl">
Options +ExecCGI
SetHandler perl-script
PerlHandler ModPerl::Registry
</FilesMatch>

</Directory>

#
# Note that from this point forward you must specifically allow

That's all I have pertaining to PERL... Is the problem in those codes or is it more likely residing either in my Perl folder itself or elsewhere in my httpd.conf file?

(and for those with nothing better to do... you can find the httpd.conf file itself here: http://www.creo.ath.cx/httpd.conf )

Thanks {again}
«SK»
 
Back
Top