freefall
08-05-2006, 02:00 PM
I am running Apache 2.2.3 with ActivePerl 5.8.7 and mod_perl 2. I have used Perl for several years but just started researching mod_perl this week.
I am developing a web site which must handle a lot of traffic and I like the idea of Apache storing a compiled version of the scripts in RAM.
For testing simplicity, this is my entry in httpd.conf
<FilesMatch "\.p[lm]">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</FilesMatch>
However, I am unable to run any scripts which use my own custom libraries, I receive a 500 error. Here is the simple test.pl
#Perl::Output exports $body and printHTML and printHTML prints the headers, layout, and $body content.
use Perl::Output;
$body = "Hello World";
printHTML();
The script Perl/Output.pm, when run by itself, works fine but any script which tries to use a custom module fails.
Any ideas? I have tried messing around with the Apache directives but I am too new to mod_perl to know exactly what to do.
Thanks!
I am developing a web site which must handle a lot of traffic and I like the idea of Apache storing a compiled version of the scripts in RAM.
For testing simplicity, this is my entry in httpd.conf
<FilesMatch "\.p[lm]">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</FilesMatch>
However, I am unable to run any scripts which use my own custom libraries, I receive a 500 error. Here is the simple test.pl
#Perl::Output exports $body and printHTML and printHTML prints the headers, layout, and $body content.
use Perl::Output;
$body = "Hello World";
printHTML();
The script Perl/Output.pm, when run by itself, works fine but any script which tries to use a custom module fails.
Any ideas? I have tried messing around with the Apache directives but I am too new to mod_perl to know exactly what to do.
Thanks!