RE: [PHP] RE: connection_aborted was [PHP] trikky authentication question
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | RE: [PHP] RE: connection_aborted was [PHP] trikky authentication question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149722@lists.php.net to get a copy of this message | ||
?? Are you reading that chapter at all? Closing the browser has
absolutely nothing to do with aborted connections unless the browser is
closed while data is actually flowing across the wire. You are completely
on the wrong track here. HTTP is a simple stateless protocol. Sessions
can be used to emulate state, but that doesn't mean you suddenly have a
stateful connection-oriented protocol. Between clicks of your browser you
do not have an active connection from the browser to the web server (with
the minor exception of keep-alive connections, but they aren't what you
think anyway, so ignore those). Since you don't have an active
connection, closing your browser could not possible abort a connection.
-Rasmus
On Sun, 1 Jun 2003, electroteque wrote:
> of course thats where i got the example from but it doesnt work
>
> ignore_user_abort(true);
> if (connection_aborted()) $this->db->query("UPDATE users SET logged_in=0
> WHERE userID=$this->userID");
>
> if i close the browser its not setting the fiel to 0 meaning they are logged
> out
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com]
> Sent: Sunday, June 01, 2003 5:46 PM
> To: daniel@electroteque.org
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] RE: connection_aborted was [PHP] trikky
> authentication question
>
>
> On Sun, 1 Jun 2003 daniel@electroteque.org wrote:
> > how can i get this to work ??
> >
> > if (connection_aborted()) $this->db->query("UPDATE users SET logged_in=0
> > WHERE userID=$this->userID");
>
> Did you read the connection handling chapter in the manual?
>
> http://www.php.net/manual/en/features.connection-handling.php
>
> -Rasmus
>