note 104741 added to function.getenv
| From: | speller at yandex dot ru | Date: | Mon, 04 Jul 2011 23:50:45 +0000 |
| Subject: | note 104741 added to function.getenv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181230@lists.php.net to get a copy of this message | ||
When running PHP as FastCGI, getenv() returns different results for 'path' and
'PATH' params (under Windows at least). For example:
- The _SERVER["PATH"] variable equals "to
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Rational\common;etc",
i.e. the Apache server environment.
- The system *environment* variable PATH of the PHP process itself equals to
"E:\usr\local\fcgi-bin;E:\usr\local\common-bin;E:\usr\local\imagick" (for example, set by
mod_fcgid config).
getenv('PATH') return the first case - the server environment variable, but
getenv('path') return the secod case - the PHP environment variable (as of PHP 5.3.6).
Do not know is it a bug or is it a feature?
----
Server IP: 93.93.89.7
Probable Submitter: 194.165.31.30
----
Manual Page -- http://www.php.net/manual/en/function.getenv.php
Edit -- https://master.php.net/note/edit/104741
Del: integrated -- https://master.php.net/note/delete/104741/integrated
Del: useless -- https://master.php.net/note/delete/104741/useless
Del: bad code -- https://master.php.net/note/delete/104741/bad+code
Del: spam -- https://master.php.net/note/delete/104741/spam
Del: non-english -- https://master.php.net/note/delete/104741/non-english
Del: in docs -- https://master.php.net/note/delete/104741/in+docs
Del: other reasons-- https://master.php.net/note/delete/104741
Reject -- https://master.php.net/note/reject/104741
Search -- https://master.php.net/manage/user-notes.php