RFC: slight change to exec functions (Was Re: [PHP-DEV] why does exec() use the shell?)

From: Date: Wed, 12 Jun 2002 21:53:09 +0000
Subject: RFC: slight change to exec functions (Was Re: [PHP-DEV] why does exec() use the shell?)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-85180@lists.php.net to get a copy of this message
PHP uses the shell (or cmd.exe or command.com on windows) because the shell knows how to search the path for a command if the full path is not specified. It should be relative simple to change the behaviour of some of the PHP execution functions (eg: not popen) so that it executes the file directly if it is_file && is_executable. Are there any objections to making such a change? I don't think it has any BC implications. --Wez. On 10/06/02, "Lawrence Greenfield" <leg+@andrew.cmu.edu> wrote: > Looking through the PHP documentation, I see that exec() invokes the > shell. Why is this? There's already a function that invokes the > shell (with all associated costs and security holes). Why does PHP > need two? > > Is there any way of invoking programs without involving the shell?

« previous php.dev (#85180) next »