#41361 [Fbk]: shell_exec() does not find binaries
ID: 41361
Updated by: sebastian@php.net
Reported By: sebastian@php.net
Status: Feedback
Bug Type: Program Execution
Operating System: Linux
PHP Version: 5CVS-2007-05-11 (CVS)
New Comment:
$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.
Previous Comments:
------------------------------------------------------------------------
[2007-05-11 12:07:59] tony2001@php.net
Cannot reproduce.
What is the value of $PATH?
Did you try disabling XDebug?
------------------------------------------------------------------------
[2007-05-11 04:57:36] sebastian@php.net
Description:
------------
sb@vmware ~ % cat test.php
<?php
shell_exec("php -v");
sb@vmware ~ % which php
/usr/local/php-5.2/bin/php
sb@vmware ~ % 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
sb@vmware ~ % php test.php
sh: php: not found
sb@vmware ~ % vim test.php
sb@vmware ~ % cat test.php
<?php
shell_exec("/usr/local/php-5.2/bin/php -v");
sb@vmware ~ % 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
Thread (7 messages)