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

List:       apache-modperl
Subject:    How to make sure that PerlPostConfigRequire gets executed after PerlOptions?
From:       Thorsten_Schöning <tschoening () am-soft ! de>
Date:       2019-08-05 10:30:48
Message-ID: 118293236.20190805123048 () am-soft ! de
[Download RAW message or body]

Hi all,

I have trouble understanding when PerlPostConfigRequire gets executed
compared to PerlOptions in a setup using multiple different VHOSTs
with multiple different versions of the same code base.

To solve problems with different versions of the same code base, I'm
hosting all those different versions using their individual VHOST and
using the following option:

> PerlOptions +Parent

That way each VHOST and hence each version of the code base gets its
own distinct Perl interpreters. Now I would like to additionally
preload some code of those different codebases when the HTTPd starts
using "PerlPostConfigRequire". The important point is that this needs
to happen per VHOST and after "+Parent" took affect.

So is it enough to write both statements directly after another?

> PerlOptions           +Parent
> PerlPostConfigRequire "Some.pm"

I know when PerlPostConfigRequire gets executed, but couldn't find the
phase for PerlOptions:

https://perl.apache.org/docs/2.0/user/handlers/server.html#When_Does_perl_Start_To_Run


Some settings of "PerlOptions" are defined to be valid per directory,
while "+Parent" is known to be per server only:

https://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location


But does this mean that with the above two lines "PerlOptions" is
executed during configuration phase as well instead of e.g. during
requests? Because of "+Parent" creating new Perl interpreters, which
are needed to handle requests, that's my understanding. If that
assumption is correct, "PerlPostConfigRequire" should be executed
after "PerlOptions" as well, because within the same phase the order
of statements decided.

Am I correct? Thanks!

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


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

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