Bug 75194 - MODPERL2 not defined at server startup time
MODPERL2 not defined at server startup time
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mod_perl (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Gary Benson
David Lawrence
http://perl.apache.org/docs/2.0/devel...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-05 06:44 EDT by Ville Skyttä
Modified: 2007-04-18 12:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-06 14:41:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2002-10-05 06:44:39 EDT
The tehnique presented in
<http://perl.apache.org/docs/2.0/devel/porting/porting.html#Requiring_a_specific_mod_perl_version_>
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
<IfDefine !MODPERL2>
# This should not be touched, since we're running with mod_perl 2
PerlModule Doesnt::Exist
</IfDefine>
Comment 1 Gary Benson 2002-11-04 11:45:41 EST
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
are parsed.
Comment 2 Gary Benson 2002-11-05 06:35:15 EST
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.
Comment 3 Gary Benson 2002-11-25 05:22:52 EST
Fixed upstream http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=103809221823707
Comment 4 Gary Benson 2003-01-06 14:41:04 EST
Fixed in 1.99_07-2.

Note You need to log in before you can comment on or make changes to this bug.