#39207 [NEW]: Some $_SERVER variables missing on executing php5-cgi from shell
| From: | konradg at irc dot pl | Date: | Fri, 20 Oct 2006 08:14:17 +0000 |
| Subject: | #39207 [NEW]: Some $_SERVER variables missing on executing php5-cgi from shell | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-103770@lists.php.net to get a copy of this message | ||
From: konradg at irc dot pl
Operating system: Linux 2.6.17.6-amd64, Debian 3.0
PHP version: 5.1.6
PHP Bug Type: CGI related
Bug description: Some $_SERVER variables missing on executing php5-cgi from shell
Description:
------------
Some $_SERVER variables in fastcgi version (php5-cgi) are missing _only_
when executing directly from shell command line.
Variables are:
_SERVER["PHP_SELF"] (set but no value)
_SERVER["SCRIPT_NAME"] (not set)
_SERVER["SCRIPT_FILENAME"] (not set)
_SERVER["PATH_TRANSLATED"] (not set)
_SERVER["DOCUMENT_ROOT"] (not set)
These variables _are_ set in CLI version of php5 and when executing
php5-cgi by web server.
Reproduce code:
---------------
echo "<? phpinfo() ?>" > info.php
php5-cgi info.php > info.txt
Expected result:
----------------
_SERVER["PHP_SELF"] => info.php
_SERVER["SCRIPT_NAME"] => info.php
_SERVER["SCRIPT_FILENAME"] => info.php
_SERVER["PATH_TRANSLATED"] => info.php
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["REQUEST_TIME"] => 1161331562
_SERVER["argv"] => Array
(
[0] => info.php
)
_SERVER["argc"] => 1
in output
Actual result:
--------------
_SERVER["PHP_SELF"] => no value
_SERVER["REQUEST_TIME"] => 1161331600
_SERVER["argv"] => Array
_SERVER["argc"] => 1
--
Edit bug report at http://bugs.php.net/?id=39207&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39207&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39207&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39207&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39207&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39207&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39207&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39207&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39207&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39207&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39207&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39207&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39207&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39207&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39207&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39207&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39207&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39207&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39207&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39207&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39207&r=mysqlcfg