jpeg has asked for the wisdom of the Perl Monks concerning the following question:
This is almost certainly a stupid configuration issue. In httpd.conf I have
....
PerlSwitches -wT
PerlSwitches -I/usr/local/apache2 -I/usr/local/apache2/pl
and later:
PerlModule pl::Hello
<Location /hello>
SetHandler modperl
PerlResponseHandler pl::Hello
</Location>
in /usr/local/apace2/pl I have Hello.pm.
So when I issue a request for http://localhost/hello
I get a blank page and the error log says:
failed to resolve handler pl::Hello
I've tried changing the PerlModule and PerlResponseHandler lines to Hello (same result, even when moving Hello.pm to site_perl) and pl/Hello (different error entirely).
I have a traditional cgi that does a foreach my $i (@INC) {print $i} and /usr/local/apache2 and /usr/local/apache2/pl are not present. On the other hand, when I changed the PerlModule and PerlResponseHandler lines to refer to Hello.pm, apache barfs with this error:
error Can't locate pl::Hellopm in @INC (@INC contains:
/usr/local/apache2 /usr/local/apache2/pl /usr/lib/perl5/5.8.6/i486-linux /usr/lib/perl5/5.8.6 ...(truncated)
So what is incorrect with the above syntax? Is that not how I specify my own handlers? Am I missing some directives?
What is the difference between the modperl and perl-script SetHandler options?
Thanks for your patience.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache/mod_perl2 : "failed to resolve handler"
by ikegami (Patriarch) on Jun 20, 2005 at 15:40 UTC | |
by mpeters (Chaplain) on Jun 20, 2005 at 16:22 UTC | |
by jpeg (Chaplain) on Jun 20, 2005 at 16:24 UTC | |
by kaif (Friar) on Jun 21, 2005 at 06:31 UTC |