Benoit Caron wrote:
>
> I'm trying to set a way of passing some environnement variables from my
> front-end server to my back-end so that my Registry or PerlRun script run
> unchanged. What I've done is that I've modified my frontend to add, with
> mod_rewrite, the environnement data I need (REFERER and REMOTE_ADDR), and I
> tried, on the backend server, to add the value I received in the
> environnement, like that :
>
> $ENV{$key} = $args{$key};
that probably won't work.
>
> or also like that :
>
> $r->subprocess_env($key, $new_value);
>
> My problem is that my change are erased before I get to the Response phase,
> no matter how I set the environnement.
try from a PerlPostReadRequestHandler instead. you may be running up
against some other mod_perl process. mod_perl will set up the
environment once per request - typically at the content generation
phase, but there are ways to force it to do so sooner.
that's about all I can think of at the moment...
--Geoff
>
> Where did i go wrong? Do I need to add a PerlPassEnv in my httpd.conf? And,
> then, one more place to edit if I want to pass a new Environnnement variables?
>
> And, is that a good way to acheive that?