thezip has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

I'm in the process of installing mod_perl and HTML::Mason on my Win2K Workstation, and I have ActiveState Perl 5.8.8 (build 519) and Apache 2.2.23 installed.

To enable mod_perl and the Mason handler, I have added this code to httpd.conf:

LoadModule perl_module modules/mod_perl.so PerlModule HTML::Mason::ApacheHandler <Location /> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </Location>

Unfortunately, when I attempt to start Apache, Apache complains that the operation has failed. An Apache configfile test confirms that my httpd.conf is valid. A glance at the httpd error log reveals:

[Thu Nov 02 10:09:15 2006] [error] Can't load Perl module HTML::Mason: +:ApacheHandler for server 127.0.0.1, exiting...

So then I locate the HTML::Mason::ApacheHandler and compile it (via `perl -c ApacheHandler.pm`) and get this response:

Can't locate Apache/Constants.pm in @INC (@INC contains: C:/Perl/site/ +lib C:/Perl/lib .) at ApacheHandler.pm line 13. BEGIN failed--compilation aborted at ApacheHandler.pm line 13.

Sure enough, Apache/Constants.pm does not exist, although there is an Apache2/Const.pm module.

I have searched PM and Google for a workaround for the missing/misplaced module, but was unable to find what I was looking for.

Could someone please provide an explanation of why this has happened, and what the appropriate fix action would be?

-Update-

Ack! It appears that I have version incompatabilities. I mistakenly thought I had installed mod_perl 2.0, but ActiveState only provides v1.27 -- this explains much.

Is there a mod_perl 2.0 port available for Win32?

Regards,

Jim

Where do you want *them* to go today?

Replies are listed 'Best First'.
Re: ApacheHandler Tries to Access Missing Apache::Constants Module
by perrin (Chancellor) on Nov 02, 2006 at 20:46 UTC

      Hmm... now it becomes stranger...

      I was mistaken about my being mistaken. When I look inside PPM on my box, I realize that I *did* install mod_perl-2.2

      It's now the problem where the Apache::Constants module seems to be missing...

      Any suggestions?

      Where do you want *them* to go today?
        Maybe you have an old version of Mason there? Newere ones should realize that mod_perl 2 is installed and look for Apache2::Const.