#24759 [Opn]: exec() or system() et all cause an infinite loop of starting requested program

From: Date: Wed, 23 Jul 2003 05:58:40 +0000
Subject: #24759 [Opn]: exec() or system() et all cause an infinite loop of starting requested program
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-44553@lists.php.net to get a copy of this message
ID: 24759 Updated by: wez@php.net Reported By: jkramer at controlvision dot com Status: Open Bug Type: IIS related Operating System: Windows XP PHP Version: 4.3.2 New Comment: You are running the CGI version of PHP and it picks up the script name from the environment now, rather than from the command line as it is "more secure". There is (or should be) an ini setting to control this, however, you probably want to be running the CLI version of PHP from your scripts instead. Previous Comments: ------------------------------------------------------------------------ [2003-07-22 18:42:12] jkramer at controlvision dot com Description: ------------ In a PHP script running under IIS 5.1, with Windows XP (this has been reproduced on Windows 2000 as well), I try to execute another PHP process and get as many php sessions as can open up till my machine starts to halt because it goes out of memory. Note, I have made sure it hits that line of code only once, by doing "cmd /c Start C:\php\php.exe -f phpfile.php" and doing an echo "before"; and echo "after"; before and after the line of code, before and after get echoed ONCE. This command works correctly via the commandline. Reproduce code: --------------- <?PHP exec('c:\php\php.exe -f C:\inetpub\wwwroot\anotherphpfile.php'); ?> Expected result: ---------------- The application to run once.. not 50-100 or more times.. Actual result: -------------- PHP executes numerous times, for one line of code.. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24759&edit=1

« previous php.bugs (#44553) next »