hmmmm...
just tested it on my box: win xp sp2, apache 2.2.2, php 5.1.4 and 1gb of
ram. ran it under CLI.
copied your code and and created a 0 btye test.bat file.
rebooted the machine so a fresh start.
first time, i actually gained 3 megs of ram back, after the process
timed out after 60 seconds.
second time, after timing out, came back to same amount.
melmack wrote:
Hi
I have a big problem with shell commands execution via PHP.
I have written a very short PHP script ilustrating the problem:
<?php
for($i=0;$i<1000;$i++)
{
exec("test.bat");
}
?>
test.bat is just an empty file.
This script causes about 10 MB memory leak. It can be observed
by usage of performance system monitor. This problems occurs in
all available enviroments:
- IIS Webserver.
- Apache webserver
- PHP command line interpreter
Memory leak is observable only on Windows platform
(tested on Windows XP). On Linux everything works OK.
Does someone know how to solve this problem? Any help appreciated
Best regards
Melmack
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php