replacing register_shutdown_function
| From: | Brian Moon | Date: | Wed, 28 May 2003 22:36:58 +0000 |
| Subject: | replacing register_shutdown_function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149325@lists.php.net to get a copy of this message | ||
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