#41361 [NEW]: shell_exec() does not find binaries

From: Date: Fri, 11 May 2007 04:57:36 +0000
Subject: #41361 [NEW]: shell_exec() does not find binaries
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112518@lists.php.net to get a copy of this message
From:             sebastian@php.net
Operating system: Linux
PHP version:      5CVS-2007-05-11 (CVS)
PHP Bug Type:     Program Execution
Bug description:  shell_exec() does not find binaries

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 bug report at http://bugs.php.net/?id=41361&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41361&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41361&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41361&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41361&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=41361&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41361&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41361&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41361&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41361&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41361&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=41361&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=41361&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41361&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41361&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41361&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41361&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41361&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41361&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41361&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41361&r=mysqlcfg


Thread (7 messages)

« previous php.bugs (#112518) next »