Hi Geoff - > > and this does not work either: > > <Perl> > > push @{$Location{"/"}->{PerlSetVar}}, ["CFG", "/path/to/file"]; > > $PerlRequire = "startup.pl"; > > </Perl> > [snip] > > what may be happening is that your dynamic configuration may be putting your > PerlSetVar into a per-directory scope instead of a per-server scope, since > your config is now in a <Perl> section. meaning, Apache->server->dir_config > is (rightfully) empty because now your configuration is in > Apache->request->dir_config. of course, you can't get at $r->dir_config at > startup, so you're pretty much SOL. > > try looking at $r->dir_config('CFG') in a request and see if your value is > there. if it is, then I guess my theory is right, and there is little that > can be done about it.
Thanks, you're right about what is happening. Since I need to set the config file path dynamically in httpd.conf and I need to access it in startup.pl, I ended up using an environment variable instead: PerlPassEnv CFG <Perl> $ENV{CFG} ||= "/path/to/file"; $PerlRequire = "startup.pl"; </Perl> I had to use PerlPassEnv outside the Perl section - using something like: push @PerlSetEnv, ["CFG", "/path/to/file"]; inside the Perl section seems to have the same issues with per-directory scope as PerlSetVar. Thanks, Larry