Re: Clone of the concurrent users limit of Zend Encoder 4.0 ?
| From: | HoWang Wang | Date: | Sat, 11 Feb 2006 04:48:50 +0000 |
| Subject: | Re: Clone of the concurrent users limit of Zend Encoder 4.0 ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230246@lists.php.net to get a copy of this message | ||
HoWang Wang wrote:
> Hi all,
>
> The Zend Encoder 4.0 (beta) have a new function in the license manager
> which can limit the number of concurrent users. I have wriiten something
> to work like it. But I found a problem. My script can limit the number
> of concurrent running script only. When the script ends, there is some
> data remain in the buffer (of Apache, I think) and the client connection
> is still active! How can I solve this? Please help, Thanks.
>
> Regards
Is it really impossible? Can I do it with Connection Handling?
<?php
set_time_limit(0);
ignore_user_abort(true);
// add 1 to the number of concurrent users
// the rest of code
while (!connection_aborted()) {
// keep on locking
} else {
// release lock
}
?>