Red Hat Bugzilla – Bug 75194
MODPERL2 not defined at server startup time
Last modified: 2007-04-18 12:47:12 EDT
The tehnique presented in
doesn't work with mod_perl-1.99_05-3 in the server config files. The perl code
sample in the document (Apache::exists_config_define("MODPERL2")) works, but
<IfDefine MODPERL2> doesn't.
To reproduce, put this in /etc/httpd/conf.d/perl.conf and try to restart httpd:
LoadModule perl_module modules/mod_perl.so
# This should not be touched, since we're running with mod_perl 2
If you put that bit of code in a .htaccess you'll find that MODPERL2 _is_
getting defined, but it must be happening after httpd.conf and the conf.d files
Joe Orton wrote:
> That won't work with 2.0 at least. <IfDefine> interpretation happens
> as the file is parsed; mod_perl is defining MODPERL2 in a "pre_config"
> hook, which happens after the file has been parsed, but before it has
> been processed.
> Don't see any easy fixes there.
I'll refer this to the mod_perl developers.
Fixed upstream http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=103809221823707
Fixed in 1.99_07-2.