Re: HTTP_ENV_VARS vs. HTTP_SERVER_VARS
| From: | Zeev Suraski | Date: | Sat, 04 Nov 2000 02:04:08 +0000 |
| Subject: | Re: HTTP_ENV_VARS vs. HTTP_SERVER_VARS | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37097@lists.php.net to get a copy of this message | ||
At 22:17 03/11/2000, Chuck Hagenbuch wrote:
Apparently when you run php in cgi mode, a lot of variables that otherwise get put in the HTTP_SERVER_VARS array (in fact, pretty much everything except PHP_SELF) is instead in the HTTP_ENV_VARS array. This makes it difficult to write portable code that doesn't rely on register_globals being on. Is there any chance that the cgi could put these into the HTTP_SERVER_VARS array, or that there could be a combined HTTP_VARS array containing both, maybe?We could populate HTTP_SERVER_VARS with the environment variables as well, in CGI mode (giving precedence to the few server vars). I don't think PHP should selectively copy only some of these variables over, because we can't really know what kind of variables each server would define. Does anybody see any drawbacks in that approach? Any comments? Zeev