Thanks for the input.

I tried PerlPassEnv and found no change.  In fact, I can't verify
PerlPassEnv does anything at all.  I'm using perl-script as my handler so
SetupEnv is turned on and I get all the environment variables in the
response phase.

In the header parser and authentication phases, I only get MOD_PERL,
MOD_PERL_API_VERSION, and PATH.  PerlPassEnv does not appear to do anything.

One wierd thing, though.  In the authentication handler, I set the variable
WS_ENTITY to a piece of $r->hostname.  If I reboot the server, on the first
request, this variable does not appear before the response phase.  However,
in subsequent requests to the server, WS_ENTITY is found in the earlier
phases but no other variables are, other than the Mod_Perl variables listed
above.  The wierd thing is, I set three other variables at the same time as
WS_ENTTY but they don't show up--go figure.

BTW, I was testing PerlPassEnv with SERVER_HOME, not WS_ENTITY.  I can only
conclude that PerlPassEnv is buggy.

i have the same server running several virtual hosts and want to set the
database name for the host in the apache config and I need this value
available in the authentication handler.

Any other ideas?


Fred Moyer wrote:
> 
> stevethames wrote:
>> Can anyone tell me how to retrieve the environment variables set by the
>> Apache server in the PerlAuthenHandler or the PerlHeaderParserHandler? 
>> Basically any handler that is called before the PerlResponseHandler. 
>> 
>> I am using virtual hosts and want to set a variable for each one.  This
>> variable is needed in the authentication handler.  I can create a
>> database
>> and store values by the host name but setting them in the environment
>> would
>> be easier. 
> 
> It sounds like you are looking for PerlPassEnv
> 
> http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlPassEnv_
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieve-server-environment-vars-before-response-handler.-tf2305332.html#a6413194
Sent from the mod_perl - General mailing list archive at Nabble.com.

Reply via email to