Doc #26566 [Ana->Csd]: Why does EXEC() have to use CMD.EXE

From: Date: Tue, 04 Apr 2017 09:01:03 +0000
Subject: Doc #26566 [Ana->Csd]: Why does EXEC() have to use CMD.EXE
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14579@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=26566&edit=1 ID: 26566 Updated by: peehaa@php.net Reported by: taomyn at hotmail dot com Summary: Why does EXEC() have to use CMD.EXE -Status: Analyzed +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Windows PHP Version: * Assigned To: peehaa Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2016-11-18 22:21:33] kalle@php.net Thinking about this more, I think like Ferenc said, we should document this better and point to the bypass_shell open for proc_open() to keep BC. Adapting to proc_open() from exec() should be really straight forward. Reclassifying the report to be a documentation type. ------------------------------------------------------------------------ [2015-06-13 06:54:07] kalle@php.net Changing this to any version, as the BC break should be low enough to be allowed to be introduced in a x.z release ------------------------------------------------------------------------ [2015-01-01 16:51:07] tyrael@php.net we already have bypass_shell for proc_open, we could do something similar for exec (or just document this better and advise people on windows to use proc_open if they don't want the additional cmd.exe to be executed). ------------------------------------------------------------------------ [2003-12-10 03:13:58] taomyn at hotmail dot com Perhaps you could create a new function, or even add an extra optional boolean parameter to EXEC() that would when "true" would not use CMD.EXE? E.g. $no_cmd = true; EXEC("c:\\winnt\\notepad.exe", $result, $status, $no_cmd); This wouldn't break old code? ------------------------------------------------------------------------ [2003-12-09 16:50:48] wez@php.net Because we use it as the shell to launch not only external processes, but built-in commands such as dir that are not found in separate binaries. I can see the use, but can't see how to implement it without breaking backwards compatibility. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=26566 -- Edit this bug report at https://bugs.php.net/bug.php?id=26566&edit=1

« previous php.doc.bugs (#14579) next »