Re: Proposal: interface improvement for exec(), system(), and passthru().
| From: | jimw at apache dot org | Date: | Sat, 03 Nov 2001 07:42:54 +0000 |
| Subject: | Re: Proposal: interface improvement for exec(), system(), and passthru(). | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-69561@lists.php.net to get a copy of this message | ||
Arcady Genkin <a.genkin@utoronto.ca> wrote:
> o If the first argument is an array, we assume that:
> - the first element of the array is the command to be executed,
> - and all other elements are command-line parameters
> - if PHP is in safe mode, quote each parameter separately
wouldn't it be better to just use execvp() and make escpaing each
parameter not be an issue? (that also makes it easier to pass arguments
with spaces, etc, and i think it would be useful even outside of safe
mode.)
that doesn't solve the 2>&1 problem, but perhaps that could be handled
as a special case. using /bin/sh to run things from exec() and system()
just always gives me the willies. :)
jim