> Geoff, > So I haven't been able to get very far on the code to test this further, > but in the Eagle book I noticed this (section 9.1.4): > > "subprocess_env() is only required if you need to change the environment > in a subprocess launched by a different handler or module."
what this section is talking about is the ability of mod_perl to alter the environment of other handlers, such as mod_php. in those cases, you are required to use subprocess_env. > > So what would happen if the C module is setting it's own ENV instead of > using ap_table_set? ou're thinking too hard :) there is no ENV in C-land, really. I mean, there are ways to get to perl's %ENV via C but that's not what you say you're doing. so forget about %ENV for the moment - %ENV gets set specifically my modules (mod_cgi, mod_perl, mod_php) based on the contents of the subprocess_env table and has no bearing at all if you're accessing the table directly. > Would that explain why I can't see the value in the > perl module using subprocess_env, but when I call void subprocess_env(), > the value suddenly appears in %ENV and the subprocess table? not really. but clearly you have some kind of problem. unfortunately I've never seen this before and I don't see anything in the code to suggest what your problem might be. and if I can't reproduce it I can't solve it. here are a few things to try though. first, see if changing your calls make any difference. that is, use $r->subprocess_env->get() and $r->subprocess_env->set() instead of other forms to remove the tie magic from the equation and see if that helps at all. next I would try fiddling with PerlSetupEnv to see if that has some hidden interaction with your reads. you seem to know some C, so I'd try creating a C content handler and use that to just dump the subprocess_env table. you can use mod_example.c as a guide. if you can see the variable in your own content handler but not when mod_perl is the content handler then I guess that at least verifies something. (what, I don't know :) anyway, if you are able to reproduce the problem and roll it up into the tarball I posted then I could fix whatever it is in mod_perl core that's causing you harm. HTH --Geoff -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html