Re: Forking a search - pcntl
| From: | chris smith | Date: | Tue, 18 Apr 2006 14:02:39 +0000 |
| Subject: | Re: Forking a search - pcntl | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234174@lists.php.net to get a copy of this message | ||
On 4/18/06, Stut <stuttle@gmail.com> wrote:
> James Nunnerley wrote:
>
> >I'm creating a search function as part of our webmail frontend, however I'm
> >having big problems with timeout etc.
> >
> >What we'd like to do is run the actual search query in the background (i..e.
> >fork) while the viewable page shows a nice scrollie banner etc!
> >
> >Due to various problems with the server we are using (Zeus) we can't just
> >run an exec(). I've had a look around, and it would seem that pcntl maybe
> >the way forward.
> >
> >Does anyone have an example working script, or indeed a decent tutorial on
> >how to use the functionality? The php manual has limited information on
> >using the functions, and I just can't get my head around how it's meant to
> >work?!!!
> >
> >
> IMHO forking in response to a web request is a very very very bad idea(tm).
On top of that advice, see the big notice on the php manual page:
http://www.php.net/pcntl
Process Control should not be enabled within a webserver environment
and unexpected results may happen if any Process Control functions are
used within a webserver environment.
--
Postgresql & php tutorials
http://www.designmagick.com/