Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

PHP bug #60602

View bug60602_output.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
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
)
View bug60602_output.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?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.