perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Licon <fb...@prodigy.net>
Subject Re: Setting %ENV from modperl handler
Date Sun, 25 Sep 2005 21:40:55 GMT
I'm using a PerlAccessHandler to protect pages. When
the page is initially accessed, it triggers an
authentication process. The PerlAccessHandler calls a
content handler which gets Database values checks
them, does some cookie stuff and then finally allows
access to the original page.

 What I want is to place certain key values extracted
from the initial database call, (processed by the 
content handler) into the CGI %ENV environment. The
values will be dynamic, dependant on who logins in,
and they would be used to limit access, set page
options etc, based on say a value like,
$ENV{'LOGIN_GROUP'}.

 The idea was to make values necessary for later page
processing easily available to CGI and the result of
only a single database call done from the handler.

 Any ideas?

 -ray

--- "Philip M. Gollucci" <pgollucci@p6m7g8.com> wrote:

> Ray Licon wrote:
> > Philip,
> > 
> >  I am using the handler directive:
> > 
> > SetHandler perl-script
> > 
> > But, I'm still not able to place a value into cgi
> from
> > my handler that is available to a perl cgi script
> by
> > examining the %ENV contents. I'm not even certin
> which
> > of the calls I've attempted 'should' work. By
> adding
> > some name value pair into the response header, I
> > thought it should show up as an 'HTTP_' prefixed
> value
> > in %ENV, like HTTP_MY_USER,
> > 
> >  as in ...$r->headers_out->set('MY_USER' =>
> some_value');
> > 
> > 
> >  but I get nothing.
> Can post the actual cgi invocation from the handler
> in question.
> And maybe the httpd.conf snippet(s) ?
> 
> The above should at least put it in the headers.
> 
> If you want it in the environment, why not just do
> 
> $ENV{var} = value ?
> 
> 
> -- 
> END
>
------------------------------------------------------------
>      What doesn't kill us can only make us stronger.
>                  Nothing is impossible.
> 				
> Philip M. Gollucci (pgollucci@p6m7g8.com)
> 301.254.5198
> Consultant / http://p6m7g8.net/Resume/
> Senior Developer / Liquidity Services, Inc.
>    http://www.liquidityservicesinc.com
>         http://www.liquidation.com
>         http://www.uksurplus.com
>         http://www.govliquidation.com
>         http://www.gowholesale.com
> 


Mime
View raw message