Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
PHP bug #60602
Array
(
[PATH] => /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/opt/local/bin
[TMPDIR] => /var/folders/x8/x8B31ineEHynQ7mnvdPnMk+++TI/-Tmp-/
[SHELL] => /bin/zsh
[HOME] => /Volumes/Data/greg
[USER] => greg
[LOGNAME] => greg
[DISPLAY] => /tmp/launch-0aMyEu/org.x:0
[SSH_AUTH_SOCK] => /tmp/launch-mlv87q/Listeners
[Apple_PubSub_Socket_Render] => /tmp/launch-P5XeKb/Render
[COMMAND_MODE] => unix2003
[__CF_USER_TEXT_ENCODING] => 0x1F5:0:0
[TERM_PROGRAM] => iTerm.app
[LANG] => en_GB.UTF-8
[PWD] => /tmp
[ITERM_PROFILE] => Default
[TERM] => xterm
[ITERM_SESSION_ID] => w0t0p0
[SHLVL] => 1
[OLDPWD] => /Volumes/Data/greg/code
[GREP_OPTIONS] => --color=auto
[GREP_COLOR] => 1;32
[PAGER] => less
[LC_CTYPE] => en_GB.UTF-8
[LSCOLORS] => Gxfxcxdxbxegedabagacad
[_] => /usr/bin/php
[PHP_SELF] => bug60602.php
[SCRIPT_NAME] => bug60602.php
[SCRIPT_FILENAME] => bug60602.php
[PATH_TRANSLATED] => bug60602.php
[DOCUMENT_ROOT] =>
[REQUEST_TIME] => 1330201680
[argv] => Array
(
[0] => bug60602.php
)
[argc] => 1
)
PHP Notice: Array to string conversion in /private/tmp/bug60602.php on line 4
Array
(
[PATH] => /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/opt/local/bin
[TMPDIR] => /var/folders/x8/x8B31ineEHynQ7mnvdPnMk+++TI/-Tmp-/
[SHELL] => /bin/zsh
[HOME] => /Volumes/Data/greg
[USER] => greg
[LOGNAME] => greg
[DISPLAY] => /tmp/launch-0aMyEu/org.x:0
[SSH_AUTH_SOCK] => /tmp/launch-mlv87q/Listeners
[Apple_PubSub_Socket_Render] => /tmp/launch-P5XeKb/Render
[COMMAND_MODE] => unix2003
[__CF_USER_TEXT_ENCODING] => 0x1F5:0:0
[TERM_PROGRAM] => iTerm.app
[LANG] => en_GB.UTF-8
[PWD] => /tmp
[ITERM_PROFILE] => Default
[TERM] => xterm
[ITERM_SESSION_ID] => w0t0p0
[SHLVL] => 1
[OLDPWD] => /Volumes/Data/greg/code
[GREP_OPTIONS] => --color=auto
[GREP_COLOR] => 1;32
[PAGER] => less
[LC_CTYPE] => en_GB.UTF-8
[LSCOLORS] => Gxfxcxdxbxegedabagacad
[_] => /usr/bin/php
[PHP_SELF] => bug60602.php
[SCRIPT_NAME] => bug60602.php
[SCRIPT_FILENAME] => bug60602.php
[PATH_TRANSLATED] => bug60602.php
[DOCUMENT_ROOT] =>
[REQUEST_TIME] => 1330201680
[argv] => Array
[argc] => 1
)
----- Test 1 -----
Array
(
[argv] => Array
(
[0] => /private/tmp/bug60602.php
)
)
PHP Notice: Array to string conversion in /private/tmp/bug60602.php on line 11
Array
(
[argv] => Array
)
----- Test 2 -----
Array
(
[argv] => /private/tmp/bug60602.php
)
Array
(
[argv] => /private/tmp/bug60602.php
)
<?php
print_r($_SERVER);
$pipes = array();
proc_open('/bin/echo', array(), $pipes, null, $_SERVER);
print_r($_SERVER);
echo "----- Test 1 -----\n";
$env = array('argv' => array(__FILE__));
print_r($env);
proc_open('/bin/echo', array(), $pipes, null, $env);
print_r($env);
echo "----- Test 2 -----\n";
$env = array('argv' => __FILE__);
print_r($env);
proc_open('/bin/echo', array(), $pipes, null, $env);
print_r($env);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.