Hi all, I've this strange (for me) behaviour (Apache 2.0.48/mod_perl 1.9912).
In MP2 (Registry scripts and handlers) I cannot retrieve, directly from %ENV,
the additional environvment variables that I pushed with $r->subprocess_env
method (for example in a Translation or HeaderParser phase).
In details, I can see these additional variables only by calling:
Apache->request->subprocess_env('MY_VAR')
but not with:
$ENV{'MY_VAR'}
This is not a big problem with MP handers, but with CGI scripts that run under
ModPerl::Registry: I have to port many CGI scripts that use %ENV and that
currently work fine under MP1 Apache::Registry (yes I know, I could substitute
each occurrence of $ENV{'MY_VAR'} with a code like:
MP ? Apache->request->subprocess_env('MY_VAR') : $ENV{'MY_VAR'};
However, I correctly see this additional variable in CGI/mod_cgi scripts with
$ENV{'MY_VAR'}, in SSI pages with <!--#echo var="MY_VAR"--> (and also in PHP),
so I'm a little bit confused... :-)
I configured Apache 2 with:
...
Alias /registry/ "/path/to/subprocess_env/cgi-bin/"
<Directory "/path/to/subprocess_env/cgi-bin/">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
# redundant with 'perl-script'...
PerlOptions +SetupEnv
</Directory>
...
I read docs, 'horse' book but I haven't found any relevant info. I'm missing
something in my configuration in order to populate and retrieve values from
%ENV?
I attached a little tar.gz package with complete scripts, MP handlers, and
Apache conf (MP 1 & 2) files I used in order to easily reproduce my tests.
Thanks in advance for any suggestion :-)
by
- Enrico
subprocess_env-test.tar.gz
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
