Re: [PHP] spawing new PHP process

2002-11-27 Thread Geranium
In article <[EMAIL PROTECTED]>, Robert McPeak <[EMAIL PROTECTED]> wrote: > I have other situations where I would like to somehow "spawn" a new php > process so that the page loads quickly and my user doesn't get frustrated or > confused. Hang on, there's lots of talking around the point here. Thi

Re: [PHP] spawing new PHP process

2002-11-26 Thread Rasmus Lerdorf
Usually the best solution is to use whatever backend you are talking to correctly. For a long-running MySQL query, for example, you should have a look at the non-blocking mysql_unbuffered_query() call. There is a fork() function in the pcntl extension and there is also a very experimental thread

Re: [PHP] spawing new PHP process

2002-11-26 Thread ROBERT MCPEAK
Rasmus, Thanks for you reply. I agree that what you suggest is the correct solution for the mail delivery scenario I used as an example. My example was poor in that in limited the scope of what I was asking. I have other situations where I would like to somehow "spawn" a new php process so th

Re: [PHP] spawing new PHP process

2002-11-26 Thread Adam Voigt
Have your page before the email's would actually be sent, submit to a page with a frameset, in the bottom frame have a height of 1 pixel so that it's invisible. Then, in your PHP page, add something like: parent.topframe.progress.value = eval(parent.topframe.progress.value)+1; Have that

Re: [PHP] spawing new PHP process

2002-11-26 Thread Marco Tabini
Assuming you're working on UNIX--you need to use one of the execute functions (search for exec in the manual). You can spawn a separate PHP in the background in a number of way, for example, by using the screen program. If I remember correctly, you can't instantiate it directly and run it in the

Re: [PHP] spawing new PHP process

2002-11-26 Thread Rasmus Lerdorf
The correct solution for this particular problem is to just queue the outbound mail and have your MTA deliver them out of band. "man sendmail" -Rasmus On Tue, 26 Nov 2002, ROBERT MCPEAK wrote: > I'm interested in spawing a new PHP process -- if that's the correct terminology. > > The situation