Re: Bug #10638: exec(), system(), ... without reply
| From: | Daniel Beulshausen | Date: | Thu, 03 May 2001 19:53:54 +0000 |
| Subject: | Re: Bug #10638: exec(), system(), ... without reply | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-53704@lists.php.net to get a copy of this message | ||
At 20:58 03.05.2001 +0300, Andi Gutmans wrote:
At 07:42 PM 5/3/2001 +0200, Daniel Beulshausen wrote:we could behave exactly like popen if we would check for COMSPEC, and if that isn't present detect the OS and use command.com or cmd.exe, that's exactly like MS is behaving. but it would be a bad idea IMO, as server's could deny access to them security wise. daniel /*-- daniel beulshausen - daniel@php4win.de using php on windows? http://www.php4win.deAt 19:24 03.05.2001 +0200, Daniel Beulshausen wrote:Ouch but then the fix isn't popen() compatible.At 20:04 03.05.2001 +0300, Andi Gutmans wrote:no it's a bad idea, i'll shut up :) cmd line parsing is a pretty bad idea, and the user is better of doing passthru( getenv("COMSPEC") . " /c echo")At 12:59 PM 5/3/2001 -0400, Joe Brown wrote:right now we are executing the programm direct, without creating a console. maybe we should manage a list of internal commands, like echo, dir, copy,... and create a console for them...echo typically is not a program. It is a command in the CMD.exe or COMMAND.com programs. $output=exec("cmd -c echo hello"); //should produce the desired effect. Why piping output to a file changes this fact, is beyond me.The definition of exec() is that it uses popen() which starts a shell automatically. Anyway, the problem was very Windows specific and doesn't have anything to do with the syntax he used.