From: vardemor at hotmail dot com Operating system: windows 2000 professional/server PHP version: 4.3.5 PHP Bug Type: Program Execution Bug description: browser hangs with exec()
Description: ------------ I've been trying to call a Win NT executable from a PHP4 script and the result is very strange. The browser hangs, and not finish to show results. If I stop the navigation, nothing appens. The script execute an win app like that: <? //...more code here.. exec("c:\appdir\appname.exe"); //...more code here.. ?> The code after the execution is not show in the browser. The app executes normally, but after the execution the script maybe hangs the browser. PHP was installed like a ISAPI module, not CGI. All help appreciated. Reproduce code: --------------- <? $server_path = "c:\\sites\\mysite\\uploaded\\"; mt_srand((double)microtime()*1000000); $filename_doc = strval(mt_rand(1, intval(1000))) . ".doc"; move_uploaded_file($_FILES['userfile']['tmp_name'], $server_path . $filename_doc); $filename = strval(mt_rand(1, intval(1000))) . ".htm"; $arr = array(); $exe_app = $server_path . "ConvertDoc.exe"; $params = " /S " . $server_path . $filename_doc . " /F9 /T " . $server_path . $filename . " /C4 /M2 /L " . $server_path . "wordlog.log /V"; exec($exe_app . $params, $arr, $return_val); -- Edit bug report at http://bugs.php.net/?id=27787&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27787&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27787&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27787&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27787&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27787&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27787&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27787&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27787&r=support Expected behavior: http://bugs.php.net/fix.php?id=27787&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27787&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27787&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27787&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27787&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27787&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27787&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27787&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27787&r=float