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 into place for our
developers who are using dynamic vhosts.  The inability for our team to use the
rewrite rules that are present in the live application makes our testing and QA
environments incomplete.  So I had hoped to not sacrifice the great benefits of
dynamic vhosts while being able to include without modification the same
rewrite rules that we use in our live applications.  Because I do not want to
modify the rewrite rules, I've been wanting to alter document_root for the
lifetime of the request with the idea that the rewrite rules would execute with
this new document_root (I had also assumed that I would be alright to leave
document_root altered, as it would be re-evaluated upon every request).  I
found myself pushing the limits of what mod_rewrite could do (I think...I'm
still skeptical of that, considering mod_rewrite's power), and turned to
mod_perl for help.

Apparently this is not so simple no matter what technology one uses!

It seems I may have to wait a bit longer for the mod_perl2 solution.  However,
I'm glad I could be a part of this discussion, however small.  Very interesting
to know what is going on behind the scenes.

Thanks for all your folks,
Dave D.


Quoting Stas Bekman <[EMAIL PROTECTED]>:

> 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, the question has nothing to do with userdir. I just
> thought (w/o looking at it) that it had some magical way to change
> ap_document_root that we didn't know about. But as you said, it doesn't.
>
> The problem we are trying to solve is how to allow users to change the
> document_root value in the server config structure, w/o affecting other
> threads if run in the threaded enviroment.
>
> We already agreed that it should be OK to change document_root in the
> non-threaded enviroment, where users will be responsible at restoring the
> value at the end of the request, should they wish to modify it. it worked
> perfectly fine in mod_perl 1, but it wasn't threaded.
>
> > With regards to mod_userdir, I had a thought about patching it to
> > also provide "mod_userdir_group" and "mod_userdir_path" notes.
> > Does that sound like a useful thing?  Or, instead of in r->notes,
> > this sort of userdir information seems useful for a new sub-struct
> > in the request_rec.  Wish me luck suggesting that on [EMAIL PROTECTED] :)
>
> You will need more than just good luck. You should try to wait for the
> next big meteorite rain and who knows that may just work.
>
>
> --
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>
> --
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>
>



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to