Re: [PHP] Asynchronous PHP Execution

2008-07-06 Thread Waynn Lue
On Sat, Jul 5, 2008 at 12:28 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Sat, Jul 5, 2008 at 6:01 AM, Waynn Lue [EMAIL PROTECTED] wrote: I have a system where a user clicks on a button which causes rows to be inserted in to the database. I'd also like to run some lengthier

Re: [PHP] Asynchronous PHP Execution

2008-07-06 Thread Richard Heyes
Waynn Lue wrote: and exec/shell (but that doesn't seem to be asynchronous), but neither seems optimal. It can be if you redirect the output streams and put an ampersand after it: ?php exec('sleep 5 /dev/null 2/dev/null '); echo 'Script ended'; ? This tiny sample should end

Re: [PHP] Asynchronous PHP Execution

2008-07-06 Thread Waynn Lue
and exec/shell (but that doesn't seem to be asynchronous), but neither seems optimal. It can be if you redirect the output streams and put an ampersand after it: ?php exec('sleep 5 /dev/null 2/dev/null '); echo 'Script ended'; ? This tiny sample should end immediately, and

[PHP] Asynchronous PHP Execution

2008-07-05 Thread Waynn Lue
I have a system where a user clicks on a button which causes rows to be inserted in to the database. I'd also like to run some lengthier post-processing on those rows, but don't want to put it in the critical path of the rows being inserted and returning to the user. What's the best way to either

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Richard Heyes
and exec/shell (but that doesn't seem to be asynchronous), but neither seems optimal. It can be if you redirect the output streams and put an ampersand after it: ?php exec('sleep 5 /dev/null 2/dev/null '); echo 'Script ended'; ? This tiny sample should end immediately, and the

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Shawn McKenzie
Richard Heyes wrote: and exec/shell (but that doesn't seem to be asynchronous), but neither seems optimal. It can be if you redirect the output streams and put an ampersand after it: ?php exec('sleep 5 /dev/null 2/dev/null '); echo 'Script ended'; ? This tiny sample should end

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Richard Heyes
Also: exec('sleep 5 /dev/null '); Maybe? Two ampersands you mean? Why - what does it do? You're also not redirecting STDERR. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Shawn McKenzie
Richard Heyes wrote: Also: exec('sleep 5 /dev/null '); Maybe? Two ampersands you mean? Why - what does it do? You're also not redirecting STDERR. My bad. I was trying to shorten your command. redirects stdout and stderr, unfortunately in c shell though. -Shawn -- PHP General

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Shawn McKenzie
Richard Heyes wrote: Also: exec('sleep 5 /dev/null '); Maybe? Two ampersands you mean? Why - what does it do? You're also not redirecting STDERR. I can't always remember because I think some things that are in c shell but aren't available in bourne have been incorpoated into bash. So

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Daniel Brown
On Sat, Jul 5, 2008 at 6:01 AM, Waynn Lue [EMAIL PROTECTED] wrote: I have a system where a user clicks on a button which causes rows to be inserted in to the database. I'd also like to run some lengthier post-processing on those rows, but don't want to put it in the critical path of the rows