note 81059 added to reserved.variables
| From: | spamtrap at scottydm dot com | Date: | Wed, 13 Feb 2008 02:15:46 +0000 |
| Subject: | note 81059 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136086@lists.php.net to get a copy of this message | ||
I was a little frustrated by the fact that some of the _SERVER variables didn't seem to exist,
so I did a bit of Googling and found the answer: many of these variables are supplied by the web
server and not all web servers supply the same set of variables.
I found a comparison between Apache v1.3.29 and IIS v5.1 on this page: http://koivi.com/apache-iis-php-server-array.php
Useful for those of us doing cross-platform development.
While running experiments with different browsers I noticed some of the HTTP_* variables come and go
depending on the browser used, or in the case of Opera by diddling the "user mode" (the
widget that lets you look at a page as text only, etc.). For example: in IE and Opera
HTTP_KEEP_ALIVE was missing, but was present in Firefox and Mozilla, and when I fiddled with
Opera's "user mode" I got somethings called HTTP_TE and HTTP_CACHE_CONTROL.
So, what you get is dependent on the web server AND the browser.
I did see one IIS supplied variable not on that list: REQUEST_TIME, which seems to be in Unix
timestamp format.
While researching this I discovered there are plenty of people who have their phpinfo() page visible
and indexed on a few search engines. For those who want to dig a bit deeper than that nice web page
comparing Apache to IIS, looking at other peoples' phpinfo() pages could be useful. You get the
version of PHP plus OS and web server they use, along with all the _SERVER variables. I found the
highest percent of signal-to-noise by searching for "phpinfo()" (with the quotes) on
Dogpile: http://www.dogpile.com/
----
Server IP: 208.69.120.35
Probable Submitter: 71.39.149.116
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- https://master.php.net/note/edit/81059
Del: integrated -- https://master.php.net/note/delete/81059/integrated
Del: useless -- https://master.php.net/note/delete/81059/useless
Del: bad code -- https://master.php.net/note/delete/81059/bad+code
Del: spam -- https://master.php.net/note/delete/81059/spam
Del: non-english -- https://master.php.net/note/delete/81059/non-english
Del: in docs -- https://master.php.net/note/delete/81059/in+docs
Del: other reasons-- https://master.php.net/note/delete/81059
Reject -- https://master.php.net/note/reject/81059
Search -- https://master.php.net/manage/user-notes.php