How to get PHP to exec() a PHP Script??
Posted: Tue Aug 06, 2002 12:16 am
Hi Everyone,
I am hoping that this is a simple problem with a simple solution otherwise, I have a lot of work ahead of me.
The platform I am running on is Win2K with IIS 5.0 and PHP 4.1.1.
Safe mode is not enabled.
I am writing a script that, during the course of execution needs to execute another script that will then run in the background and complete execution without the user having to wait for it to complete.
The script looks something like this:
where script.php is something simple like:
I have tried to run this but it just makes PHP hang. I have tried other executable files and plain batch files and these all seem to work. It only appears to be when I am executing a PHP script from a PHP script.
I thank anyone who can answer this question as it has me stumped.
:: Kondro ::
I am hoping that this is a simple problem with a simple solution otherwise, I have a lot of work ahead of me.
The platform I am running on is Win2K with IIS 5.0 and PHP 4.1.1.
Safe mode is not enabled.
I am writing a script that, during the course of execution needs to execute another script that will then run in the background and complete execution without the user having to wait for it to complete.
The script looks something like this:
Code: Select all
<?php
$cmd = "C:/php/php.exe -q script.php >> outfile";
?>Code: Select all
<?php
echo "Hello World!\n";
?>I thank anyone who can answer this question as it has me stumped.
:: Kondro ::