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 through a Userdir, or
>  * something like that, it'll screw you.  But it's back-compatible...
>  * @return The document root
>  * @deffunc const char *ap_document_root(request_rec *r)
>  */
> AP_DECLARE(const char *) ap_document_root(request_rec *r);
> 
> we haven't had a chance yet to work on figuring out how to solve it for 
> mp2. Let me do some research and I'll be back to you shortly.

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 the path.

The path is typically $HOME/public_html of the user, though
that is configurable with the UserDir directive, so YMMV.

Cheers,
Glenn

-- 
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