Re: mod_perl2 and document_root

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: [...] I think this is something that Apache 2.1/2 should address. Having server-wide config localized for requests. it'll benefit things like mod_userdir, us and many other modules which may have the need to modify server-wide values for the duration of the request. Agreed.

Re: mod_perl2 and document_root

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 12:27:02PM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >On Wed, Aug 18, 2004 at 10:59:25AM -0700, Stas Bekman wrote: > > > >>Glenn Strauss wrote: > >> > >>>Apache caches the server_rec, so as Stas said, modifying it affects > >>>things globally, and across the request

Re: mod_perl2 and document_root

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: On Wed, Aug 18, 2004 at 10:59:25AM -0700, Stas Bekman wrote: Glenn Strauss wrote: Apache caches the server_rec, so as Stas said, modifying it affects things globally, and across the request. In C, if I wanted to local'ize the server_rec for the request, I would make a copy of

Re: mod_perl2 and document_root

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 10:59:25AM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >Apache caches the server_rec, so as Stas said, modifying it affects > >things globally, and across the request. In C, if I wanted to > >local'ize the server_rec for the request, I would make a copy of the > >ser

Re: mod_perl2 and document_root

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: On Wed, Aug 18, 2004 at 09:36:45AM -0400, Dave Della Costa wrote: Wow, I just got back in the office and I see I sparked quite a discussion! I had suspected that this feature was specific to the first version of mod_perl, alas... A little background: what I have been trying to

Re: mod_perl2 and document_root

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 09:36:45AM -0400, Dave Della Costa wrote: > Wow, I just got back in the office and I see I sparked quite a discussion! I > had suspected that this feature was specific to the first version of mod_perl, > alas... > > A little background: what I have been trying to do is ess

Re: mod_perl2 and document_root

2004-08-18 Thread Dave Della Costa
Wow, I just got back in the office and I see I sparked quite a discussion! I had suspected that this feature was specific to the first version of mod_perl, alas... A little background: what I have been trying to do is essentially reset document_root for a set of rewrite rules that I want to drop

Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Glenn Strauss wrote: [...] What is/are the problem(s) we're trying to solve here? We can use "mod_userdir_user" to detect that it is a userdir request and that document_root does not apply, even if we can't get the userdir root path. We can't easily do the same for other mappings. Well, actually,

Re: mod_perl2 and document_root

2004-08-17 Thread Glenn Strauss
On Tue, Aug 17, 2004 at 10:09:12PM -0700, Stas Bekman wrote: > >In Apache2, mod_userdir sets a note named "mod_userdir_user" in > >the r->notes table, so there is a way to detect if you are in a > >Userdir request (if using mod_userdir). However, that note only > >tells you the target user, not th

Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Geoffrey Young wrote: Right. The examples you've found are from mod_perl 1, Apache2 has this in its docs: /** * Retrieve the document root for this server * @param r The current request * @warning Don't use this! If your request went through a Userdir, or * something like that, it'll screw you. B

Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Glenn Strauss wrote: On Tue, Aug 17, 2004 at 04:45:20PM -0700, Stas Bekman wrote: Right. The examples you've found are from mod_perl 1, Apache2 has this in its docs: /** * Retrieve the document root for this server * @param r The current request * @warning Don't use this! If your request went th

Re: mod_perl2 and document_root

2004-08-17 Thread Glenn Strauss
On Tue, Aug 17, 2004 at 04:45:20PM -0700, Stas Bekman wrote: > Right. The examples you've found are from mod_perl 1, Apache2 has this in > its docs: > > /** > * Retrieve the document root for this server > * @param r The current request > * @warning Don't use this! If your request went throug

Re: mod_perl2 and document_root

2004-08-17 Thread Geoffrey Young
> Right. The examples you've found are from mod_perl 1, Apache2 has this > in its docs: > > /** > * Retrieve the document root for this server > * @param r The current request > * @warning Don't use this! If your request went through a Userdir, or > * something like that, it'll screw you. B

Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Dave Della Costa wrote: Hey folks, I'm trying to learn how to use mod_perl to change document_root on the fly, but I'm having a lot of difficulty with it. Here's the setup: Apache/2.0.50, mod_perl/1.99_11 Perl/v5.8.4 PHP/4.3.8 Server I'm calling the code this way: PerlTransHandler MyApache::Rewri

mod_perl2 and document_root

2004-08-17 Thread Dave Della Costa
Hey folks, I'm trying to learn how to use mod_perl to change document_root on the fly, but I'm having a lot of difficulty with it. Here's the setup: Apache/2.0.50, mod_perl/1.99_11 Perl/v5.8.4 PHP/4.3.8 Server I'm calling the code this way: PerlTransHandler MyApache::RewriteURI ...and this is