Re: VirtualHost + PerlSetVar

2003-12-23 Thread Geoffrey Young
> OK, we have to do it ourselves, which is easy (.e.g with the patch > below). The problem is this: all vhosts inherit PerlPostConfigHandler > from the main server and run it. They all inherit the PerlSetVar as > well. I'm not sure this is the wanted behavior. I suppose this is why > Apache doesn'

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Geoffrey Young
>> That is indeed much simpler. Is the fact that you can get from the >> root server to vhost to vhost documented anywhere? I couldn't find it >> in the docs. > > > I think not. Patches are welcome. it's the same as it was in 1.0, which is documented in Recipe 4.1 in the mod_perl Developer's

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Stas Bekman
Paul G. Weiss wrote: On Mon, 22 Dec 2003 15:26:53 -0800, Stas Bekman <[EMAIL PROTECTED]> wrote: You don't need to walk the config tree to accomplish that. There is a much simpler way: sub post_config { my($conf_pool, $log_pool, $temp_pool, $s) = @_; for (my $vhost_s = $s->next; $vhost

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Paul G. Weiss
On Mon, 22 Dec 2003 15:26:53 -0800, Stas Bekman <[EMAIL PROTECTED]> wrote: You don't need to walk the config tree to accomplish that. There is a much simpler way: sub post_config { my($conf_pool, $log_pool, $temp_pool, $s) = @_; for (my $vhost_s = $s->next; $vhost_s; $vhost_s = $vhost

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Stas Bekman
Paul G. Weiss wrote: Let me see if I have this straight. With your patch, if I have: PerlPostConfigHandler A PerlPostConfigHandler B PerlPostConfigHandler C then A gets run once, B gets run once, and C gets run once. But if I have: PerlPostConfigHandler A PerlPostConfigHandler C then A

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Paul G. Weiss
Let me see if I have this straight. With your patch, if I have: PerlPostConfigHandler A PerlPostConfigHandler B PerlPostConfigHandler C then A gets run once, B gets run once, and C gets run once. But if I have: PerlPostConfigHandler A PerlPostConfigHandler C then A gets run twice (once

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Stas Bekman
Stas Bekman wrote: Paul G. Weiss wrote: Rats! PerlPostConfigHandler appears to have absolutely no effect when placed inside a scope. It does indeed run when placed outside. I know this because I have something like: open(H, ">", "/tmp/output"); print H "something\n" in my handler and the fi

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Boris Zentner
Hi, Am Samstag, 20. Dezember 2003 22:52 schrieb Paul G. Weiss: > Great suggestion. I'll certainly try that. > > As to why I expected PerlSetVar to be available during startup, it is > because that is how it was with mod_perl1, and I wasn't considering the > fact that configuration in mod_perl2 i

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Stas Bekman
Paul G. Weiss wrote: Rats! PerlPostConfigHandler appears to have absolutely no effect when placed inside a scope. It does indeed run when placed outside. I know this because I have something like: open(H, ">", "/tmp/output"); print H "something\n" in my handler and the file written to only w

Re: VirtualHost + PerlSetVar

2003-12-20 Thread Paul G. Weiss
Rats! PerlPostConfigHandler appears to have absolutely no effect when placed inside a scope. It does indeed run when placed outside. I know this because I have something like: open(H, ">", "/tmp/output"); print H "something\n" in my handler and the file written to only when PerlPostConfigHan

Re: VirtualHost + PerlSetVar

2003-12-20 Thread Paul G. Weiss
Great suggestion. I'll certainly try that. As to why I expected PerlSetVar to be available during startup, it is because that is how it was with mod_perl1, and I wasn't considering the fact that configuration in mod_perl2 is a very different animal. I'll pass your suggestion on to the maintai

Re: VirtualHost + PerlSetVar

2003-12-19 Thread Stas Bekman
Paul G. Weiss wrote: [...] The reason this is important is that I'm trying to get Apache::PageKit to run in virtual hosts, and it depends on the availability of PerlSetVar variables on startup. First of all, why do you expect PerlSetVar to be available at the server startup? The config phase is

Re: VirtualHost + PerlSetVar

2003-12-19 Thread Paul G. Weiss
More interesting info... First of all, I've upgraded to mod_perl-1.99_11 with no change. Second, I've determined that the per-VirtualHost values are visible in the request, but not during server startup. Here's the situation in an (I hope) easy to reproduce format: -- config -- PerlRequire /v

VirtualHost + PerlSetVar

2003-12-19 Thread Paul G. Weiss
I have something like this: PerlModule Module PerlSetVar abc def Module->start; and in Module.pm use Apache::ServerUtil () ... sub startup { my $value = Apache->server->dir_config("abc"); ... } and lo and behold - $value is undef ! However, if I take the PerlSetVar and move it outside