P is for Practical | |
PerlMonks |
Weird HTML::Mason errorby tomazos (Deacon) |
on Aug 01, 2005 at 15:26 UTC ( [id://479925]=perlquestion: print w/replies, xml ) | Need Help?? |
tomazos has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to setup HTML::Mason on an apache+mod_perl server.
When I put PerlModule HTML::Mason::ApacheHandler into my apache httpd.conf, I get the following error:
Any ideas where to start looking/debugging this one?
Update: PerlModule just loads HTML::Mason::ApacheHandler at server launch. If you do not set it, and just put the following in httpd.conf as follows:
Without calling PerlModule first, it simply requires it ever time a request is processed at runtime. In this instance, even when I do it that way it still fails with a similiar error, when it trys to load HTML::Mason::ApacheHandler:
Update 2: When I simply try to:
I am not sure if this is the same problem. In any case PerlModule HTML::Mason::ApacheHandler should work. See Mason basic config via httpd.conf
Could it have to do with me recently installing and then uninstalling Perl 5.8.7 in my home directory even though the system wide configuration is 5.6.1? Longshot. Could it have something to do with me compiling mod_perl as a DSO and not having it statically linked? Another longshot. HTML::Mason::CGIHandler works fine. Apache::Registry also works fine. HTML::Mason::ApacheHandler always fails with the above weird 'unknown field' error.
Solved! You need to enabled PerlMethodHandlers when you build mod_perl. PerlMethodHandlers allow object-oriented style inheritance of apache handlers between Perl objects. HTML::Mason::ApacheHandler uses this feature. It could have given a nicer error message than "unknown field" though. Especially seeing as PerlMethodHandlers are disabled by default. -Andrew.
Back to
Seekers of Perl Wisdom
|
|