> PerlSetVar seems not to work for me! The part of interest in my httpd.conf
> looks like this:
>
> Alias /contest /www/u-dev/contest
> PerlModule Apache::Registry
> PerlModule Apache::DBI
> PerlTaintCheck On
> <Location /contest>
> PerlSetVar BlaTest BlaVal
> SetHandler perl-script
> PerlHandler Apache::Registry
> PerlRequire /www/u-dev/contest/mod_perl_init.pl
> Options ExecCGI
> PerlSendHeader Off
> allow from all
> </Location>
>
> The mod_perl_init.pl script looks like this:
>
> use Apache;
> my $s = Apache->server;
> print $s->server_hostname || "Error";
> print $s->dir_config('BlaTest') || "Error";
>
> Now what happens at server startup is that the hostname gets printed
> correctly, but instead of the value of BlaTest (should be BlaVal) "Error" is
> printed.
>
you can't use $s (the server record) to capture PerlSetVar that exist on a
per-directory basis (within a <Location> or <Directory> block). try
Apache->request->dir_config('BlaTest');
instead. you should use $s->dir_config() for items set on a per-server basis
only, not per-directory.
--Geoff