Re: accessing environment variables set by other modules

2010-04-15 Thread André Warnier
Chris Datfung wrote: I want to use mod-perl to edit server responses under certain conditions. My plan was to use various modules, like mod-setenvif and mod-security to set an environment variable and then have mod-perl edit the response body only run when the environment variable is set. I tried

Re: accessing environment variables set by other modules

2010-04-15 Thread Adam Prime
You need to use $f->r->subprocess_env in the filter. subprocess_env is a RequestRec method, not a Filter method. Adam Chris Datfung wrote: On Thu, Apr 15, 2010 at 12:23 AM, Perrin Harkins > wrote: The subprocess_env info that Adam sent you should have worked.

Re: accessing environment variables set by other modules

2010-04-15 Thread Torsten Förtsch
On Thursday 15 April 2010 11:10:49 Chris Datfung wrote: > Thanks, subprocess_env works when just using a response handler. When used > with a filter I get the following error message: > > == > [Thu Apr 15 11:47:34 2010] [error] [clien

Re: accessing environment variables set by other modules

2010-04-15 Thread Chris Datfung
On Thu, Apr 15, 2010 at 12:23 AM, Perrin Harkins wrote: > The subprocess_env info that Adam sent you should have worked. Can > you show us what you tried? Can you try it in a response handler to > make sure it's not an odd bug with filters? > > Hi Perrin, Thanks, subprocess_env works when just

Re: accessing environment variables set by other modules

2010-04-14 Thread Perrin Harkins
On Wed, Apr 14, 2010 at 5:17 PM, Chris Datfung wrote: > What I'm looking for is a way to access the environment variables stored in > the internal Apache structure. Any leads of how to access these environment > variables is much appreciated. The subprocess_env info that Adam sent you should have

Re: accessing environment variables set by other modules

2010-04-14 Thread Chris Datfung
On Tue, Apr 13, 2010 at 9:57 PM, Chris Datfung wrote: > On Tue, Apr 13, 2010 at 6:34 PM, Fred Moyer wrote: > >> Correct me if I'm wrong, but don't you need to do this: >> >> PerlPassEnv TE >> > Hi Fred, After a bit more research, It seems that PerlPassEnv is just for passing shell environment var

Re: accessing environment variables set by other modules

2010-04-13 Thread Chris Datfung
On Tue, Apr 13, 2010 at 6:34 PM, Fred Moyer wrote: > Correct me if I'm wrong, but don't you need to do this: > > PerlPassEnv TE > > in your httpd.conf? > > Hey Fred, That looks correct and I added PerlPassEnv to the virtual host config, but I still don't see the word 'TEST' when accessing http:/

Re: accessing environment variables set by other modules

2010-04-13 Thread Fred Moyer
Correct me if I'm wrong, but don't you need to do this: PerlPassEnv TE in your httpd.conf? On Mon, Apr 12, 2010 at 11:44 AM, Chris Datfung wrote: > I want to use mod-perl to edit server responses under certain conditions. My > plan was to use various modules, like mod-setenvif and mod-security

Re: accessing environment variables set by other modules

2010-04-13 Thread Chris Datfung
Thanks mate. Unfortunately neither of those suggestions worked. Any other ideas? Chris On Mon, Apr 12, 2010 at 10:15 PM, Adam Prime wrote: > you might want to take a look at subprocess_env > > > http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_subprocess_env_ > > I don't think i'v

Re: accessing environment variables set by other modules

2010-04-12 Thread Adam Prime
you might want to take a look at subprocess_env http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_subprocess_env_ I don't think i've every tried to use %ENV in a Filter, perhaps it's not getting populated. %ENV can be a little strange in mp2, have a look at: http://perl.apache.or

accessing environment variables set by other modules

2010-04-12 Thread Chris Datfung
I want to use mod-perl to edit server responses under certain conditions. My plan was to use various modules, like mod-setenvif and mod-security to set an environment variable and then have mod-perl edit the response body only run when the environment variable is set. I tried the following test whi