I have the following which executes perfectly but NOT in the background as it should? It actually stops the page loading until it finishes which is not good.
shell_exec("/usr/bin/php /home/public_html/pages/test/backg.php {$user_info} {$user_info2} {$user_info3} &");
I also tried
exec("/usr/bin/php /home/public_html/pages/test/backg.php {$user_info} {$user_info2} {$user_info3} &");
I thought the
&
meant it would execute then let the holding page carry on regardless?
exec(sprintf("%s > %s 2>&1 & echo $! >> %s", $cmd, $outputfile, $pidfile));
php execute a background process
exec("/usr/bin/php /path/background.php > /dev/null 2>&1 &");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With