[UPHPU] Forking PHP execution in a webserver

Mr Ritter uphpu at candlefire.org
Thu Dec 3 10:04:17 MST 2009


On Thu, Dec 3, 2009 at 9:53 AM, Jordan Schatz <white.armor at gmail.com> wrote:

> I was wondering if anyone could enlighten me about what is the best
> practice on forking a script's execution when it is running under Apache? I
> have looked online and it seems that I should not use pcntl_fork if I am
> running under Apache. which makes sense since Apache will be trying to
> manage forking PHP to handle multiple requests...
>
> Mostly I want to fork to handle loging, in particular I want to send a
> text message every time a particular page is loaded. I don't want the
> page load to have to wait for the function to log in to the phone
> gataway, send the text, and get confirmation, before it finishes sending
> the page.
>
> Thanks!
> Jordan
>

I'd suggest looking at something along the lines of multiplexing.
http://netevil.org/blog/2005/may/guru-multiplexing

--
Ritter


More information about the UPHPU mailing list