I don't see any reason why your `` invoked process doesn't see the CGI env vars. For example:

#!/usr/bin/perl
print "Content-type: text/plain\n\n";
$ENV{'PATH'} = '/bin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
print qx{printenv |grep REMOTE_ADDR};

prints:
REMOTE_ADDR=127.0.0.1

So as you can see, it works. The problem is probably in your external program, since the env vars are all there.

Or may be you are using PerlSetEnv Off?
http://perl.apache.org/docs/1.0/guide/config.html#PerlSetupEnv

I've now located and tried the subprocess_env() in conjunction w/
spawn_proc_prog(). I just do a foreach on the ENV hash and stuff the values
into subprocess_env(). That works (I have a test perl subprogram that just
dumps the ENV), but now I am not able to get the output of the program.
I
pasted in the read_data() func from the example and I have a single scalar
accepting the return value from spawn_proc_prog() per the example and that
is supposed to give me the output filehandle.
Can you post a simple test program that reproduces the problem?

Also it'd be really useful if somebody could add a test suite for Apache::Subprocess for (mod_perl 1.0). You can look at the t/apr/subprocess test in mod_perl 2.0 to a basic example. It's a good way to learn how to use Apache::Test, which is covered here:
http://perl.apache.org/docs/general/testing/testing.html

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to