note 92121 added to reserved.variables.server
| From: | RichardYork at osu1 dot php dot net | Date: | Thu, 09 Jul 2009 18:19:14 +0000 |
| Subject: | note 92121 added to reserved.variables.server | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158122@lists.php.net to get a copy of this message | ||
Not documented here is the fact that $_SERVER is populated with some pretty useful information when
accessing PHP via the shell.
["_SERVER"]=>
array(24) {
["MANPATH"]=>
string(48) "/usr/share/man:/usr/local/share/man:/usr/X11/man"
["TERM"]=>
string(11) "xterm-color"
["SHELL"]=>
string(9) "/bin/bash"
["SSH_CLIENT"]=>
string(20) "127.0.0.1 41242 22"
["OLDPWD"]=>
string(60) "/Library/WebServer/Domains/www.example.com/private"
["SSH_TTY"]=>
string(12) "/dev/ttys000"
["USER"]=>
string(5) "username"
["MAIL"]=>
string(15) "/var/mail/username"
["PATH"]=>
string(57) "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
["PWD"]=>
string(56) "/Library/WebServer/Domains/www.example.com/www"
["SHLVL"]=>
string(1) "1"
["HOME"]=>
string(12) "/Users/username"
["LOGNAME"]=>
string(5) "username"
["SSH_CONNECTION"]=>
string(31) "127.0.0.1 41242 10.0.0.1 22"
["_"]=>
string(12) "/usr/bin/php"
["__CF_USER_TEXT_ENCODING"]=>
string(9) "0x1F5:0:0"
["PHP_SELF"]=>
string(10) "Shell.php"
["SCRIPT_NAME"]=>
string(10) "Shell.php"
["SCRIPT_FILENAME"]=>
string(10) "Shell.php"
["PATH_TRANSLATED"]=>
string(10) "Shell.php"
["DOCUMENT_ROOT"]=>
string(0) ""
["REQUEST_TIME"]=>
int(1247162183)
["argv"]=>
array(1) {
[0]=>
string(10) "Shell.php"
}
["argc"]=>
int(1)
}
----
Server IP: 209.41.74.194
Probable Submitter: 99.38.61.81
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.server.php
Edit -- https://master.php.net/note/edit/92121
Del: integrated -- https://master.php.net/note/delete/92121/integrated
Del: useless -- https://master.php.net/note/delete/92121/useless
Del: bad code -- https://master.php.net/note/delete/92121/bad+code
Del: spam -- https://master.php.net/note/delete/92121/spam
Del: non-english -- https://master.php.net/note/delete/92121/non-english
Del: in docs -- https://master.php.net/note/delete/92121/in+docs
Del: other reasons-- https://master.php.net/note/delete/92121
Reject -- https://master.php.net/note/reject/92121
Search -- https://master.php.net/manage/user-notes.php