Re: $PHP_SELF not set !

From: Date: Wed, 28 Nov 2001 19:57:33 +0000
Subject: Re: $PHP_SELF not set !
References: 1 2 3  Groups: php.qa 
Request: Send a blank email to php-qa+get-4081@lists.php.net to get a copy of this message
It's not a bug, $PHP_SELF is not an environment variable... At 22:28 27/11/2001, Hellekin O. Wild wrote:
Finally I found out where the problem lies ! First, it was a real mistake on my part as I redefined $PHP_SELF in an auto_prepend file using getenv('PHP_SELF') because I was using register_globals OFF and didn't want to modify the whole bunch of PHP applications that I was running. The real problem, thus is not that $PHP_SELF is not set but a problem with the getenv() function. I updated the test script to verify what environment variables are not get using getenv(). It happens that getenv('PHP_SELF') and getenv('PATH_TRANSLATED') are not set. The bug happens with both register_globals set to ON and OFF. (Note : the $_SERVER['signature'] on the test page is intentionnally left blank : not a bug.) See : http://php.hellekin.com/test/php_self.php Sorry again for that mistake : although it caught a bug, it's probably not a critical one as the variables are accessible through other means. * Although it is logic not to set $PHP_SELF when register_globals is OFF, it may be a good idea to set it anyway as this is used in a majority of scripts around, don't you think ? hellekin -- PHP Quality Assurance Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net For additional commands, e-mail: php-qa-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.qa (#4081) next »