Jie Gao wrote:
Hi All,

I have an odd situation, which I describe as follows:

I have an authentication handler and an authorisation handler for a site,
configured as:

<Location /test>
PerlOptions +SetupEnv
Options +ExecCGI
PerlAuthenHandler XXX::XXX->authen
PerlAuthzHandler YYYY::YYYY->authz
....
PerlOptions +SetupEnv
...
...
</Location>

And there is a perl (CGI) script under it that prints out the environment.

When a user is authenticated, I want to set up a few variables in
the environment. The problem is:

- if I use $r->subprocess_env($key => $value), the perl script will see the 
variables,
  but the authorisation handler will not;
- if I use $ENV($key => $value), the perl script will NOT see the variables, but
  the authorisation handler will see them.

Jie, when saying 'it will not see', you mean *it* tries to read $ENV{$key}? If so use $r->subprocess_env($key) in your authorisation handler. Won't that work? Alternatively call $r->subprocess_env() in your authz handler and you should have %ENV populated then (but it's not efficient):
http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html#C_subprocess_env_


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

Reply via email to