Re: apache2 or mod_perl2 oddball error

Fred Moyer <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
I think Perrin is right, I've never seen -compile syntax used in
PerlModule directives.  Move the PerlModule directives into a
startup.pl file.

In your httpd.conf:

LoadModule perl_module        modules/mod_perl.so
PerlPostConfigRequire /my/startup.pl

In your startup.pl:

#!/usr/bin/perl

use strict;
use warnings;

# make sure we are in a sane environment.
$ENV{MOD_PERL} or die "GATEWAY_INTERFACE not Perl!";

use Apache2::Const -compile => ':common';

... add any other PerlModule statements in the 'use Module' format.

On Fri, Jun 17, 2011 at 1:09 PM, William Bulley <[email protected]> wrote:
> According to Fred Moyer <[email protected]> on Fri, 06/17/11 at 13:43:
>>
>> On Fri, Jun 17, 2011 at 10:29 AM, William Bulley <[email protected]> wrote:
>> > I have Perl 5.14 compiled from source.
>> > I have apache 2.2.19 ?compiled from source.
>> > I have mod_perl2 2.0.5 compiled from source (with these patches):
>>
>> Can you pull 2.0.6-dev from svn and build?
>>
>> http://perl.apache.org/download/source.html
>>
>>   % svn checkout https://svn.apache.org/repos/asf/perl/modperl/trunk/
>> mod_perl-2.0
>
> I have just built/installed mod_perl-2.0.6 (not sure about the dev part)
> and tried again to start the apache server (using "# apachectl -t"):
>
>   [Fri Jun 17 16:05:58 2011] [error] syntax error at (eval 21) line 1, near "require Apache2::Const -"\n
>   [Fri Jun 17 16:05:58 2011] [error] Can't load Perl module Apache2::Const -compile => ':common' for server localhost:80, exiting...
>
> This is very frustrating...  :-(
>
> Regards,
>
> web...
>
> --
> William Bulley                     Email: [email protected]
>
> 72 characters width template ----------------------------------------->|
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.