PHP 4.0 Bug #9851: getenv() functions do not return variables.

From: Date: Tue, 20 Mar 2001 02:07:07 +0000
Subject: PHP 4.0 Bug #9851: getenv() functions do not return variables.
Groups: php.dev 
Request: Send a blank email to php-dev+get-49441@lists.php.net to get a copy of this message
From: kabal@ev01.net Operating system: Solaris 2.6/2.7 PHP version: 4.0.3pl1 PHP Bug Type: Other web server Bug description: getenv() functions do not return variables. The getenv() function does not return a value. machine info: [root@wink]# uname -a SunOS wink 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-2 [root@wink]# php -v 4.0.3pl1 Netscape-Enterprise/3.6 SP3 B99.280.0054 sample code: <?php $rmh = "remote"; $hr = "http ref"; $sn = "script name"; $ra = "rem add"; $ip = "testip"; $test = $REMOTE_ADDR ; $host = $HTTP_HOST; $myhost = "HOSTweb01"; $IP = getenv('REMOTE_ADDR'); $IPGET = "ip from getenv = "; $HTTPGET = "HTTP_REFERER from get env= "; $http_ref = getenv('HTTP_REFERER'); $scname = getenv('SCRIPT_NAME'); $SCTEST = "SCRIPT_NAME from getenv = "; print (" $hr $HTTP_REFERER <BR>\n"); print (" $sn $SCRIPT_NAME <BR>\n"); print ("$ra $REMOTE_ADDR <BR>\n"); print (" $ip $IP <BR>\n"); print ("$rmh $test <BR>\n") ; print ("$myhost $host<BR><BR>\n<BR>\n\n"); print ("$IPGET $IP<BR>\n"); print ("$HTTPGET $http_ref<BR>\n"); print ("$SCTEST $scname<BR>\n"); ?> for example $test retuns the correct value while $IP does not. This also works fine with apache but not with Netscape. -- Edit Bug report at: http://bugs.php.net/?id=9851&edit=1

« previous php.dev (#49441) next »