Req #35398 [Com]: php's exec() requires a shell
| From: | ajf@php.net | Date: | Thu, 08 Jan 2015 23:59:57 +0000 |
| Subject: | Req #35398 [Com]: php's exec() requires a shell | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189794@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=35398&edit=1
ID: 35398
Comment by: ajf@php.net
Reported by: szo at szo dot hu
Summary: php's exec() requires a shell
Status: Wont fix
Type: Feature/Change Request
Package: *General Issues
Operating System: posix
PHP Version: *
Block user comment: N
Private report: N
New Comment:
Or rather: exec() doesn't take an array of string arguments and a command name, it just takes a
string containing a command line, so we need a shell to parse it.
Previous Comments:
------------------------------------------------------------------------
[2015-01-08 23:59:19] ajf@php.net
Can't be done, command arguments need to be parsed, sorry.
------------------------------------------------------------------------
[2005-11-25 18:25:43] szo at szo dot hu
changed os to posix
------------------------------------------------------------------------
[2005-11-25 18:24:24] szo at szo dot hu
Description:
------------
I use php in a chroot()-et environment, and I can't use exec() unless I provide a shell in the
chroot as well, which lowers it's security a bit. The exec() requires a shell because it's
implemented using popen(). I think it should be possible to aboid popen and use dup() instead.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=35398&edit=1