NYCPHP Meetup

NYPHP.org

[nycphp-talk] Bizarre PHP putenv/getenv results

Bob Klos bklos at getoffutt.com
Thu Aug 9 17:16:59 EDT 2007


I'm wondering if anyone has seen this behavior at all
 
The system is Unixware 7.1.1 apache 1.3.34/php 4.4.2 which uses a lot of
binary cgi in the web app. In order to pass information to the cgi apps they
are placed in the environment via putenv then calls the cgi app. 
 
Occasionally, the environment variables are corrupted, usually ending up
with a blank page since the app has no or corrupt information to work from.
 
a simple example would be:
 
putenv("QUERY_STRING=$url");
putenv("HTTP_COOKIE=$HTTP_COOKIE");
 
$pipe = popen("./SD_disp", "r");
 
the only evidence I have that the environment is getting fouled up is in
phpinfo() which displays things like:
 
<option value =	 "EMERALD POINT">Emerald Point</option> 	
 
I can reproduce this behavior with a simple script that sets and unsets an
environment variable a couple of times
 
To further confuse things: 
 
This does not happen in Unixware 7.1.4
This does not happen when the Oracle database is localhost even though the
phpinfo() environment displays corruption
 
Any ideas or seen anything remotely similar? Any help would be appreciated
 
TIA,
 
Bob Klos
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070809/913d73b2/attachment.html>


More information about the talk mailing list