[MP2] Accessing custom config directives from an PostConfig handler
[prev]
[thread]
[next]
[Date index for 2005/05/23]
--nextPart13464238.BLoNLs34a1
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,
I have created my own configuration directives with Apache2::Module::add. H=
ow=20
can I access the values from an PostConfig handler?
I have got it working with the main server. But if my directives are inside=
a=20
VirtualHost they are not accessible.
sub set_fn {
my($I, $parms, $arg)=3D@_;
local $_;
Apache2::Module::get_config( __PACKAGE__, Apache2::ServerUtil->server )
->{"Directive"}=3D$arg;
}
sub postconfig {
my($conf_pool, $log_pool, $temp_pool, $s) =3D @_;
my $cfg=3DApache2::Module::get_config( __PACKAGE__,=20
Apache2::ServerUtil->server );
use Data::Dumper; warn "\npostconfig: ".Dumper( $cfg );
return Apache2::Const::OK;
}
That works if "Directive" is placed outside a VirtualHost. Inside a=20
VirtualHost the get_config in set_fn returns undef.
Torsten
--nextPart13464238.BLoNLs34a1
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQBCkfILwicyCTir8T4RAgfjAJ4x//Q2WTkCoAhMcIH1bPFbYiXtWACgjDfq
DHyRWULy0ftx1KK698UEaxU=
=K0pQ
-----END PGP SIGNATURE-----
--nextPart13464238.BLoNLs34a1--
 |
[MP2] Accessing custom config directives from an PostConfig handler
Torsten Foertsch 15:08 on 23 May 2005
|