[Swlug] mod_perl_api_version not present?

bascule asura at theexcession.co.uk
Sat Apr 2 09:27:16 UTC 2016


hi,

i'm trying to compile apache-gallery using a suse src rpm spec file that i've 
edited, during the compile the resultant gallery.pm is tested - whatever that 
means-  and the message that mod_perl.pm can't be found in @inc is shown, 
which is not surprising since it should be mod_perl2.pm,

the code in gallery.pm that i think is relevant is:
------snip------

BEGIN {

	if (exists($ENV{MOD_PERL_API_VERSION})
		and ($ENV{MOD_PERL_API_VERSION}==2)) {
		require mod_perl2;
		if ($mod_perl::VERSION >= 1.99 && $mod_perl::VERSION < 2.0) {
			die "mod_perl 2.0.0 or later is now required";
		}
		require Apache2::ServerRec;
		require Apache2::RequestRec;
		require Apache2::Log;
		require APR::Table;
		require Apache2::RequestIO;
		require Apache2::SubRequest;
		require Apache2::Const;
	
		Apache2::Const->import(-compile => 
'OK','DECLINED','FORBIDDEN','NOT_FOUND','HTTP_NOT_MODIFIED');

		$::MP2 = 1;
	} else {
		require mod_perl;

		require Apache;
		require Apache::Constants;
		require Apache::Request;
	
		Apache::Constants->import('OK','DECLINED','FORBIDDEN','NOT_FOUND');
		$::MP2 = 0;
	}
}
-----snip------
note the 	if (exists($ENV{MOD_PERL_API_VERSION})
		and ($ENV{MOD_PERL_API_VERSION}==2)) {
		require mod_perl2;
		if ($mod_perl::VERSION >= 1.99 && $mod_perl::VERSION < 2.0) {
			die "mod_perl 2.0.0 or later is now required";

according to my research there should be a perl environment variable 
MOD_PERL_API_VERSION set but as far as i can tell there is no such variable on 
my system, i've read that:
apachectl --configtest
will show what is set but all that gives me is:
httpd (pid 15337) already running

i tried adding the following to /etc/httpd/conf/modules.d/02-perl.conf:

PerlSetEnv  MOD_PERL_API_VERSION 2
PerlPassEnv MOD_PERL_API_VERSION

but still the error about no mod_perl.pm

so, any ideas?
i've tried to use cpan2pkg and that is giving a whole other set of issues

bascule




More information about the Swlug mailing list