Edit report at https://bugs.php.net/bug.php?id=44942&edit=1
ID: 44942 Comment by: mail at GerhardBechtold dot com Reported by: inqualab1985 at gmail dot com Summary: exec() hangs apache Status: Duplicate Type: Bug Package: Program Execution Operating System: Windows 2000 SP4 PHP Version: 5.2.5 Block user comment: N Private report: N New Comment: Thanks for looking into my problems with exec() at the latest PHP. Example for actual code, as in application (was running nicely in earlier PHP installations, but not under PHP 2.4 anymore): $str1Name = "C:\Map Maker\MMmacro.exe"; $str2Name = "command=remove layer"; exec(chr(34).$str1Name.chr(34).chr(32).chr(34).$str2Name.chr(34)); I am using a GIS called Map Maker, with powerful MMmacro functions (www.mapmaker.com). 'remove layer' is one of the most basic parameters of MMmacro. A more simple test version also failed: $str1Name = "C:\Windows\Notepad.exe"; exec($str1Name); I also tested, all without success: - with bat file, which then calls notepad.exe - with exe/bat in different folders: document root (C:\xampp\htdocs) or from calling directory (C:\xampp\htdocs\lupmis_s) - with 'start .....' - with popen - with exec( .... < file.in > file.out 2> nul", $output); - with exec(....,$output, $return); - with exec("ping google.com", $output, $return); ------------- My environment: PHP 5.4.4 (VC 9) Apache 2.4.2 Xampp 'default' installation 1.8 on C:\xampp Apache with PHP, MySQL running as services Win 7 Home Premium / 64 bit 4 GB RAM HP Pavilion g7 Notebook Bought in Germany, but OS and all programs installed in English Running as administrator Total application has > 220 PHP programs, with > 250 exec calls. If you give me your full email address, I can also send you the php.ini and httpd.conf. Thanks for any advice Gerhard Previous Comments: ------------------------------------------------------------------------ [2012-09-27 10:51:24] paj...@php.net Tell us which command you use and how you call it, along with the parameters (external files and the likes can be sent to my email (my handle @ php.net). ------------------------------------------------------------------------ [2012-09-27 10:39:33] mail at Gerhard-Bechtold dot com Thanks for follow-up. Where can I send it to? Regards Gerhard ------------------------------------------------------------------------ [2012-09-27 06:57:05] paj...@php.net We need something to reproduce it, as we can't. Do you have a common exe app that we can use to try to reproduce the problem you are experiencing? ------------------------------------------------------------------------ [2012-09-24 08:28:46] mail at GerhardBechtold dot com Despite various updates and fixes, I dont think, the 'exec problem' in PHP is solved. In my PHP programs, I have plenty of calls from PHP 5.3.0 to external exe files with 'exec(...)' (on local drive, with Apache 2.2.12, installed through xampp 1.7.x, on Vista and Win 7) on dozens of computers: Everything works well. But when I migrated to new computer with PHP 5.4.4 (VC9, with Apache 2.4.2, installed through xampp 1.8, on Win 7/64), the SAME exec() calls dont work anymore. No display, no error messages, no entries in log file. Configuration in httpd.conf and php.ini are identical. Any advice is appreciated. I also posted in xampp forum (http://www.apachefriends.org/f/viewtopic.php?f=6&t=51537, with confirmation, that I am not the only one with this problem....). Kind regards Gerhard ------------------------------------------------------------------------ [2012-06-04 05:09:12] hshs at hotmail dot com This bug still exist. Same work around still works. ------------------------------------------------------------------------ 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=44942 -- Edit this bug report at https://bugs.php.net/bug.php?id=44942&edit=1