environment weirdness

From: Date: Thu, 15 Jun 2000 01:05:54 +0000
Subject: environment weirdness
Groups: php.general 
Request: Send a blank email to php-general+get-1896@lists.php.net to get a copy of this message
Hi I have a mod_perl fixup handler which communicates with content handlers (e.g. php) via environment variables, and I am getting strange behavior from php: if I set an environment variable in mod_perl, it shows up in php as it should and can be retrieved with getenv(). the problem is that with php those variables persist between HTTP transactions (even with no keepalive), yet they are _not_ accessible to apache or mod_perl either at the process level or in the apache table structures. furthermore, phpinfo() does not reflect the normal set of apache CGI-oriented environment variables (SERVER_NAME etc - which are in fact available via getenv), but it does reflect the environment of the shell from which httpd was started (e.g. SHLVL, DISPLAY and such), and it also shows the environment variables set by mod_perl during previous transactions handled by the same process. huh? I'm not using putenv() at all, and without a php content handler this doesn't happen, but the vars created by the mod_perl fixup handler, which are supposed to expire with the transaction, are persisting within php. does php keep track of environment variables separately from the process environment? if so, where, and how do I get rid of them without knowing their exact names? I would cheerfully settle for detailed documentation too... any help and/or insight appreciated. darius archer

« previous php.general (#1896) next »