Bug #69118 [NEW]: exec command not executed.

From: Date: Wed, 25 Feb 2015 09:38:40 +0000
Subject: Bug #69118 [NEW]: exec command not executed.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190942@lists.php.net to get a copy of this message
From:             office at templenode dot com
Operating system: 
PHP version:      5.4.38
Package:          FPM related
Bug Type:         Bug
Bug description:exec command not executed.

Description:
------------
running a script with command /usr/bin/which does not work
create a file script.ph with the following, acces it trough web browser
and see the result of trace.txt

Test script:
---------------
<?php
$output = shell_exec('strace /usr/bin/which wget 2>> trace.txt');
echo "<pre>$output</pre>";
?>



Expected result:
----------------
getuid32()                              = 500
getgid32()                              = 500
geteuid32()                             = 500
getegid32()                             = 500
brk(0)                                  = 0x8de3000
brk(0x8e04000)                          = 0x8e04000
stat64("/usr/local/sbin/wget", 0xbf8b292c) = -1 ENOENT (No such file or
directory)
stat64("/usr/local/bin/wget", 0xbf8b292c) = -1 ENOENT (No such file or
directory)
stat64("/sbin/wget", 0xbf8b292c)        = -1 ENOENT (No such file or
directory)
stat64("/bin/wget", 0xbf8b292c)         = -1 ENOENT (No such file or
directory)
stat64("/usr/sbin/wget", 0xbf8b292c)    = -1 ENOENT (No such file or
directory)
stat64("/usr/bin/wget", {st_mode=S_IFREG|0755, st_size=357936, ...}) =
0
getgroups32(64, [500])                  = 1
fstat64(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7709000
write(1, "/usr/bin/wget\n", 14)         = 14
exit_group(0)                           = ?




Actual result:
--------------
getuid32()                              = 500
getgid32()                              = 500
geteuid32()                             = 500
getegid32()                             = 500
write(2, "/usr/bin/which: no wget in ((nul"..., 36/usr/bin/which: no
wget in ((null))
) = 36
exit_group(1)                           = ?



-- 
Edit bug report at https://bugs.php.net/bug.php?id=69118&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=69118&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=69118&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=69118&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=69118&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=69118&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=69118&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=69118&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=69118&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=69118&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=69118&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=69118&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=69118&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=69118&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69118&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=69118&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=69118&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=69118&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69118&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=69118&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=69118&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#190942) next »