Re: Re: Drop connection, keep running?
| From: | Chris Shiflett | Date: | Sat, 29 Jun 2002 00:30:29 +0000 |
| Subject: | Re: Re: Drop connection, keep running? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104446@lists.php.net to get a copy of this message | ||
John Wulff wrote:
int ignore_user_abort([bool ignore]) Looking at the question, this is definitely not the right answer.
"Lee Daniel Crocker" <lee@piclab.com> wrote in message news:20020628233050.GA7016@piclab.com...Let us know what you come up with. ChrisI'm surprized I can't find a description of how to do what seems like an obvious thing to me: I want to have my script send output to the user, then drop the connection, and then continue doing stuff that the user shouldn't have to wait for. There's lots of documentation about what to do when the user drops, but no mention of how to make the server drop it but keep running the script. I have never heard of someone wanting to do this, but you might want to look into methods of executing shell commands in the background, which seems like it should be possible. Basically, you're wanting to execute something that immediately returns control back to your PHP script. The PHP script *must* complete before it will be "finished" from the Web server's perspective. Thus, you'll have to at least split up the logic you want to do later into a separate script and just figure out how to get that running just before your script terminates. If it's written in PHP, don't forget about the CLI; it might come in handy for you in this case.