php script consuming CPU-usage
Posted: Sun Apr 03, 2005 8:13 am
Hello
(using Windows XP)
I am running a php-script and during execution it is starting another php-script (myPHP_script.php). This second php-script is running in the background and everything is working fine when i start the initial php-script from the command line. The problem starts when i try to run the php-script with Explorer or some other web-browsers -> the system then begin using a total of 100% CPU. I have tried to start "calc.exe" instead of "php myPHP_script.php" and then everything seems to be ok.
I do not know what might be wrong and i would be wery pleased if anyone could help me solve this.
PS. I have also tried to use shell_exec() but the same problem occured. And in adition i didn't manage to use shell_exec() for having a process running in the background.
regards
(using Windows XP)
I am running a php-script and during execution it is starting another php-script (myPHP_script.php). This second php-script is running in the background and everything is working fine when i start the initial php-script from the command line. The problem starts when i try to run the php-script with Explorer or some other web-browsers -> the system then begin using a total of 100% CPU. I have tried to start "calc.exe" instead of "php myPHP_script.php" and then everything seems to be ok.
Code: Select all
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("php myPHP_script.php", 3, false);PS. I have also tried to use shell_exec() but the same problem occured. And in adition i didn't manage to use shell_exec() for having a process running in the background.
regards