|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-12-05 21:20 UTC] zburlindibus at gmail dot com
[2012-05-24 23:46 UTC] felipe@php.net
-Status: Open
+Status: Not a bug
[2012-05-24 23:46 UTC] felipe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 06:00:02 2025 UTC |
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.