ID: 41361
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Program Execution
Operating System: Linux
PHP Version: 5CVS-2007-05-11 (CVS)
New Comment:
Sorry for the noise, but I thought the valgrind outputs were different.
Previous Comments:
------------------------------------------------------------------------
[2007-05-11 15:52:50] [EMAIL PROTECTED]
[EMAIL PROTECTED] ~ % cat test.php
<?php
print_r($_ENV);
[EMAIL PROTECTED] ~ % valgrind php test.php
==32011== Memcheck, a memory error detector.
==32011== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et
al.
==32011== Using LibVEX rev 1658, a library for dynamic binary
translation.
==32011== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==32011== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==32011== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et
al.
==32011== For more details, rerun with: -v
==32011==
Array
(
[CVS_RSH] => ssh
[USER] => sb
[CXXFLAGS] => -march=prescott -O2 -pipe
[GNOME_KEYRING_SOCKET] => /tmp/keyring-aV2Gx9/socket
[SSH_AGENT_PID] => 5344
[LD_LIBRARY_PATH] => /usr/lib/debug:/usr/X11R6/lib/debug
[SHLVL] => 1
[OLDPWD] => /usr/local/src/php
[HOME] => /home/sb
[DESKTOP_SESSION] => default
[GTK_RC_FILES] => /etc/gtk/gtkrc:/home/sb/.gtkrc-1.2-gnome2
[DBUS_SESSION_BUS_ADDRESS] =>
unix:abstract=/tmp/dbus-tyDNTTBGq8,guid=0589bce6a83acda7de032d0046448ed7
[GDM_XSERVER_LOCATION] => local
[COLORTERM] => gnome-terminal
[LOGNAME] => sb
[_] => /usr/bin/valgrind
[WINDOWID] => 29360224
[TERM] => xterm
[GNOME_DESKTOP_SESSION_ID] => Default
[SESSION_MANAGER] => local/wopr-mobile:/tmp/.ICE-unix/5345
[PATH] => /usr/local/src/phpunit/3.1
[GLIBCPP_FORCE_NEW] => 1
[CFLAGS] => -march=prescott -O2 -pipe
[DISPLAY] => :0.0
[LANG] => en_US.UTF-8
[XAUTHORITY] => /home/sb/.Xauthority
[SSH_AUTH_SOCK] => /tmp/ssh-GSPQwR5343/agent.5343
[SHELL] => /bin/zsh
[GDMSESSION] => default
[PWD] => /home/sb
[GLIBCXX_FORCE_NEW] => 1
[LD_PRELOAD] =>
/usr/lib/valgrind/x86-linux/vgpreload_core.so:/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so
)
==32011==
==32011== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 49 from
1)
==32011== malloc/free: in use at exit: 0 bytes in 0 blocks.
==32011== malloc/free: 12,467 allocs, 12,467 frees, 1,654,668 bytes
allocated.
==32011== For counts of detected errors, rerun with: -v
==32011== All heap blocks were freed -- no leaks are possible.
[EMAIL PROTECTED] ~ % valgrind /usr/local/php-5.2/bin/php test.php
==32029== Memcheck, a memory error detector.
==32029== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et
al.
==32029== Using LibVEX rev 1658, a library for dynamic binary
translation.
==32029== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==32029== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==32029== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et
al.
==32029== For more details, rerun with: -v
==32029==
Array
(
[CVS_RSH] => ssh
[USER] => sb
[CXXFLAGS] => -march=prescott -O2 -pipe
[GNOME_KEYRING_SOCKET] => /tmp/keyring-aV2Gx9/socket
[SSH_AGENT_PID] => 5344
[LD_LIBRARY_PATH] => /usr/lib/debug:/usr/X11R6/lib/debug
[SHLVL] => 1
[OLDPWD] => /usr/local/src/php
[HOME] => /home/sb
[DESKTOP_SESSION] => default
[GTK_RC_FILES] => /etc/gtk/gtkrc:/home/sb/.gtkrc-1.2-gnome2
[DBUS_SESSION_BUS_ADDRESS] =>
unix:abstract=/tmp/dbus-tyDNTTBGq8,guid=0589bce6a83acda7de032d0046448ed7
[GDM_XSERVER_LOCATION] => local
[COLORTERM] => gnome-terminal
[LOGNAME] => sb
[_] => /usr/bin/valgrind
[WINDOWID] => 29360224
[TERM] => xterm
[GNOME_DESKTOP_SESSION_ID] => Default
[SESSION_MANAGER] => local/wopr-mobile:/tmp/.ICE-unix/5345
[PATH] =>
/usr/local/src/phpunit/3.1:/usr/local/bin:/usr/local/php-5.2/bin:/usr/local/mysql-5.1/bin:/usr/lib/libming/bin:/usr/local/httpd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
[GLIBCPP_FORCE_NEW] => 1
[CFLAGS] => -march=prescott -O2 -pipe
[DISPLAY] => :0.0
[LANG] => en_US.UTF-8
[XAUTHORITY] => /home/sb/.Xauthority
[SSH_AUTH_SOCK] => /tmp/ssh-GSPQwR5343/agent.5343
[SHELL] => /bin/zsh
[GDMSESSION] => default
[PWD] => /home/sb
[GLIBCXX_FORCE_NEW] => 1
[LD_PRELOAD] =>
/usr/lib/valgrind/x86-linux/vgpreload_core.so:/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so
)
==32029==
==32029== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 49 from
1)
==32029== malloc/free: in use at exit: 0 bytes in 0 blocks.
==32029== malloc/free: 12,465 allocs, 12,465 frees, 1,654,666 bytes
allocated.
==32029== For counts of detected errors, rerun with: -v
==32029== All heap blocks were freed -- no leaks are possible.
------------------------------------------------------------------------
[2007-05-11 14:46:36] [EMAIL PROTECTED]
$PATH is set to
PATH=/usr/local/src/phpunit/3.1:/usr/local/bin:/usr/local/php-5.2/bin:/usr/local/mysql-5.1/bin:/usr/lib/libming/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games,
but $_ENV['PATH'] only has /usr/local/src/phpunit/3.1.
The problem also occurs without Xdebug.
------------------------------------------------------------------------
[2007-05-11 12:07:59] [EMAIL PROTECTED]
Cannot reproduce.
What is the value of $PATH?
Did you try disabling XDebug?
------------------------------------------------------------------------
[2007-05-11 04:57:36] [EMAIL PROTECTED]
Description:
------------
[EMAIL PROTECTED] ~ % cat test.php
<?php
shell_exec("php -v");
[EMAIL PROTECTED] ~ % which php
/usr/local/php-5.2/bin/php
[EMAIL PROTECTED] ~ % php -v
PHP 5.2.3-dev (cli) (built: May 11 2007 05:52:31)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Xdebug v2.0.0RC4-dev, Copyright (c) 2002, 2003, 2004, 2005,
2006, 2007, by Derick Rethans
[EMAIL PROTECTED] ~ % php test.php
sh: php: not found
[EMAIL PROTECTED] ~ % vim test.php
[EMAIL PROTECTED] ~ % cat test.php
<?php
shell_exec("/usr/local/php-5.2/bin/php -v");
[EMAIL PROTECTED] ~ % php test.php
Reproduce code:
---------------
<?php
shell_exec("php -v");
Expected result:
----------------
No output.
Actual result:
--------------
sh: php: not found
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41361&edit=1