lawrence wrote:
Pedro Graca <he****@hotpop.com> wrote in message news:<c3*************@ID-203069.news.uni-berlin.de>... The super-global array $_SERVER does not have the same keys.
If you rely on $_SERVER['DOCUMENT_ROOT'], $_SERVER['SCRIPT_FILENAME'] (IIRC),
maybe others (I can check tomorrow) you'll have a nasty surprise when
you switch servers.
I assume the same is true of $HTTP_SERVER_VARS? (I work on a project
that stays backwards compatible with PHP 4.0.6).
Yes, just tested it.
I've just run print_r($_SERVER) on both IIS and Apache.
As it is, what I said before is wrong (sorry everyone), both
[DOCUMENT_ROOT] and [SCRIPT_FILENAME] are available under both servers.
For my configuration this is what I found (unless I messed up again):
$_SERVER keys available under both servers
[DOCUMENT_ROOT]
[HTTP_*]
[PHP_SELF]
[QUERY_STRING]
[REMOTE_ADDR]
[REQUEST_METHOD]
[REQUEST_URI]
[SCRIPT_FILENAME]
[SCRIPT_NAME]
[SERVER_NAME]
[SERVER_PORT]
[SERVER_PROTOCOL]
[SERVER_SOFTWARE]
$_SERVER keys available under Apache but NOT IIS
[COMSPEC]
[GATEWAY_INTERFACE]
[PATHEXT]
[PATH]
[REMOTE_PORT]
[SERVER_ADDR]
[SERVER_ADMIN]
[SERVER_SIGNATURE]
[SystemRoot]
[WINDIR]
$_SERVER keys available under IIS but NOT Apache
[ALL_HTTP]
[APPL_MD_PATH]
[APPL_PHYSICAL_PATH]
[AUTH_TYPE]
[AUTH_USER]
[CONTENT_LENGTH]
[HTTPS]
[INSTANCE_ID]
[INSTANCE_META_PATH]
[LOGON_USER]
[ORIG_PATH_INFO]
[ORIG_PATH_TRANSLATED]
[PATH_INFO]
[PATH_TRANSLATED]
[REMOTE_HOST]
[REMOTE_USER]
[url]
--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :