exec("/dealnews/myscript.php &");
The script will run in background.
Brian Moon wrote:
Hi all,
Ever since register_shutdown_function was changed to no longer happen after the connection was closed, several things on our site have started to suck. Not the main, public site, but our internal pages where cache is regenerated and such.
I have tried using the pcntl functions in an exec'd script (both perl and PHP) to fork and hopefully return to the web app to allow it to continue (and not wait forever). This works great with CLI and the command line, but does not work at all if I exec() from mod_php.
All I do is call:
exec("/dealnews/myscript.php");
in the PHP app. myscript.php then forks. Unfortunately, exec() waits for the damn forked process to finish before he returns.
Am I just not seeing something in PHP pcntl support here or am I on a wild goose chase?
Thanks,
Brian Moon dealnews.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php