[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Upgrading a mod_perl application from Apache 2.2 to Apache 2.4
From:       André_Warnier_(tomcat) <aw () ice-sa ! com>
Date:       2018-12-07 10:03:30
Message-ID: 5C0A4572.7000001 () ice-sa ! com
[Download RAW message or body]

On 07.12.2018 09:29, Andrew Green wrote:
> Hi William,
>
>> Ahhh, ok, just be aware the get_server_description call doesn't exist in 2.2, you need
>> to perform a little eval() magic to guard against that expected failure.
>
> That doesn't seem right — it returns the following when I try it on a 2.2 box:
>
> /Apache/2.2.22 (Ubuntu) mod_apreq2-20090110/2.8.0/
>
> Perhaps it's inconsistent across distributions?
>

Just for info : because of the kind of issues mentioned above, I used another solution :

On the 2.4+ boxes :

   PerlSetVar AP_VERSION "20410"

then later :
  	my $ap_version = $r->dir_config('AP_VERSION');

Not subtle, but works for me.

What I did have more trouble with, are the new constants defined only in 2.4+, and which 
are necessary for the authentication.
Apache2::Const::AUTHZ_DENIED_NO_USER etc..
and I have not found a clean way to "define" these under Apache 2.2, so that at least my 
auth modules code *compiles* correctly (under both 2.2 and 2.4).

Other issues I encountered are more in the domain of combining my own auth/authz modules, 
with other auth/authz add-ons like Shibboleth, LDAP etc..
The logic of Apache 2.4 (and of these modules) makes it much more confusing as to what is 
called when and how many times..
I think I've mostly worked it out now, but it does not make for particularly clean code, 
or clean Apache config files, or an easy way to document this for other people less-well 
acquainted with the inner beauties of mod_perl.

I may also have a go in the future at trying the kind of "dynamic" config which Andrew 
showed earlier in this thread.
(With probably the same for-others documentation issues)

It would also be a good idea to at least document this a little bit in the on-line 
mod_perl docs, but I don't know who is in charge of that nowadays, or how to possibly 
contribute to it.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic