I am trying to exec/system an external script that should run independently of the script that called it.
I am using xampp for windows at the moment as a development server, and I tried two methods, both don’t seem to run the external script:
$run_cmd='c:\xampp\php\php.exe script.php';
exec($run_cmd);
Also tried using a new COM object:
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($run_cmd, 0, false);
I put a log writing call in the script.php, but unless I call script.php from the command line, I don’t get anything written to that log
Any ideas?
check executable file permissions. Make sure the user that executes your php script has the permission to run it