From: Operating system: ARM cross-compile PHP version: 5.3.8 Package: *Configuration Issues Bug Type: Bug Bug description:/bin/sh hardcoded in proc_open.c
Description: ------------ I've managed to cross-compile PHP 5.3.8 for ARM platforms (to be run on rooted Android phones). The trouble is that when you execute a system('pwd'), the command doesn't print any output (and it doesn't execute pwd). A strace indicates that PHP tries to execute /bin/sh -c pwd in fact. However, on Android phones, /bin/sh doesn't exist (like in Linux distros), but in fact the path is /system/bin/sh. Mounting / as read-write and creating /bin/sh to point to /system/bin/sh is more difficult than allowing a configuration key/value pair to point to the executable itself. Or use the SHELL environment variables ? It should not be hardcoded (I found this only using strace - there's no error message in case the command fails because /bin/sh is not found) - or at least, it should use the SHELL environment variable in case /bin/sh doesn't exist). Expected result: ---------------- I expect system('pwd') to work. -- Edit bug report at https://bugs.php.net/bug.php?id=60081&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60081&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60081&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60081&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60081&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60081&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60081&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60081&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60081&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60081&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60081&r=support Expected behavior: https://bugs.php.net/fix.php?id=60081&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60081&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60081&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60081&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60081&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60081&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60081&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60081&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60081&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60081&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60081&r=mysqlcfg