|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-12-09 16:34 UTC] taomyn at hotmail dot com
Description: ------------ Why does EXEC() have to spawn an extra CMD.EXE when executing a program? For example, to execute NOTEPAD.EXE, WORDPAD.EXE, even ImageMagicks CONVERT.EXE, when called with EXEC() causes a CMD.EXE process to executed which then calls the program requested. It's not needed. Please can we have a version of EXEC that does not use CMD.EXE? It's not always needed and can cause major issues such as hanging sessions and hanging web services. A prime example are users of Gallery by http://gallery.menalto.com - many of their Windows users have this issue which is why they do not "officially" support Windows when it should work. Thanks, Taomyn Reproduce code: --------------- Call any Windows program with EXEC() and you get a CMD.EXE process that then calls the requested program. E.g. exec("c:\\winnt\\notepad.exe",$result,$status); Expected result: ---------------- Only NOTEPAD.EXE should appear. Actual result: -------------- "CMD.EXE /C NOTEPAD.EXE" and "NOTEPAD.EXE" appears in the process list PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 01:00:01 2025 UTC |
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?