You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Srebrenko Sehic <ss...@gmail.com> on 2006/06/19 12:18:00 UTC

[mp2] accessing variables set via SetEnv?

If there any way to access and change a variable set via normal Apache
"SetEnv myvar 1"? I've got some other Apache modules that do stuff
depending on the value and I want to control that behaviour from
mod_perl.

Something like $r->dir_config("myvar"), but that also works on
variables set by other Apache modules and not only by PerlSetVar and
friends.

Thanks.

Re: [mp2] accessing variables set via SetEnv?

Posted by Srebrenko Sehic <ss...@gmail.com>.
On 6/19/06, Srebrenko Sehic <ss...@gmail.com> wrote:

> If there any way to access and change a variable set via normal Apache
> "SetEnv myvar 1"? I've got some other Apache modules that do stuff
> depending on the value and I want to control that behaviour from
> mod_perl.
>
> Something like $r->dir_config("myvar"), but that also works on
> variables set by other Apache modules and not only by PerlSetVar and
> friends.

I figured it out. To access envorimental variable set by other modules, use:

# get/set
$r->subprocess_env("variable_name");
$r->subprocess_env("variable_name" => "value");