From:             taomyn at hotmail dot com
Operating system: Windows 2000 and IIS 5
PHP version:      4.3.4
PHP Bug Type:     Feature/Change Request
Bug description:  Why does EXEC() have to use CMD.EXE

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

-- 
Edit bug report at http://bugs.php.net/?id=26566&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26566&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26566&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26566&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26566&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26566&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26566&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26566&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26566&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26566&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26566&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26566&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26566&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26566&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26566&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26566&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26566&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26566&r=float

Reply via email to