I am trying to launch a background process( executing php script) using popen / exec
.
i tried with proc_open
--- but results in infinite loop & terminates after some time with 500 internal error.
with popen/exec
-- no error & at the same time background script is not running as well.
my current structure is like :
test.php
$processHandle = popen("start /b php background.php", "r");
background.php
$file = fopen("test.txt","w");
echo fputs($file,"Hello World. Testing!");
fclose($file);
i tried through command prompt : php test.php
it's launching the background process, and file gets created
i tried to run the same script through web browser request: it's not working & not giving error as well.
any help please ?