On Tue, 4 Apr 2000, Karyn Ulriksen wrote:
> Which handler would be appropriate to do the cleanup on this?
you register the cleanup function from whatever handler changes
document_root. that'll happen at the same time as PerlCleanupHandler,
which is after PerlLogHandler.
>> my $old_docroot = $r
Which handler would be appropriate to do the cleanup on this?
-Original Message-
From: Doug MacEachern [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 02, 2000 10:39 PM
To: Serge document_root;
$r->register_cleanup(sub { shift->document_root($old_docroot) });
the lifetime of conf->ap_docu
there have been several requests for the ability to modify the
DocumentRoot, i reckon it's about time we allow that.
caveats:
if you want the DocumentRoot to be reset to the original value after the
request is over, you'll have to do that yourself, something like:
my $old_docroot = $r->document_r
is big on my wish list
Karyn> for upcoming apache adds. I've committed myself to bellying up to
Karyn> the bar to learn C just so I can do something like this using the
Karyn> apache engine.
Karyn> - Karyn
Karyn> -Original Message- From: Michael
Karyn> [mailto:[EMAIL
> I believe he is trying to do this 'on the fly' without reboot for
> the new configs.
>
Oh, maybe I misunderstood.
The problem I had was executing code that needed to know the document
root which seems to point to the main mod_perl doc root rather than
the root of the particular virtual root.
to:[EMAIL PROTECTED]]
Sent: Tuesday, March 28, 2000 2:03 PM
To: [EMAIL PROTECTED]
Subject: RE: Set DocumentRoot from modperl
> Sergio,
>
>I just walked this route...
>
>The long and short is that it can't be done anything close to
>feasably.
There is a work around
> Sergio,
>
>I just walked this route...
>
>The long and short is that it can't be done anything close to
>feasably.
There is a work around to this. If you use the syntax
perlcode
perlcode
require 'somefile.cgi';
more perl
more perl
then the cgi script gets imported into the envi
- Original Message -
From: "Serge
> ...parameters comes from a database
> ...so I can't restart Apache in general
I'll readilly admit that I don't actually know about the specific
performance hits here, but at my last job we did our entire config in Perl.
Yes, we just kicked the server
Sergio,
I just walked this route...
The long and short is that it can't be done anything close to feasably.
You'll have to write your own URI Translator and alter some code so that
you can
introduce your DOCUMENT_ROOT down the line to things like the mod_cgi
etc. If you
search