NYCPHP Meetup

NYPHP.org

[nycphp-talk] Sessions. Pesky, pesky sessions.

Michael mogmios at mlug.missouri.edu
Mon Jul 22 03:08:49 EDT 2002


They should expire after the given time depending on how you reconfigured
it. If it doesn't seem to have expired after the configured time try
reloading a few times. For performance reasons the script doesn't run
after every connection, it is usually ran on a probability of say 1 of 100
hits. Maybe that is your problem?


Don't dream it. Be it.

;):):-):):-):):-)8')
Michael McGlothlin <mogmios at mlug.missouri.edu>
http://kavlon.org/projects/

On Sun, 21 Jul 2002, Wayne Cope ( wrote:

> Hi all,
>
> No problem using sessions as such, but I'm over-riding the default read,
> write, destroy functions used for sessions so that when a session is
> destoyed I ncan set a flag in a database pertinent to the session.
>
> All works fine except if the browser is closed or something unfortunate
> happens and the connection is lost etc., the server doesn't seem to
> acknowledge that the session has died and promptly fails to run the destroy
> code.  If I explicity call the session_destroy() function everything works
> fine.
>
> In ASP it's pretty much taken for granted that the session destory code
> equivalent is called when a session ends, wether it be closed explicitly, by
> expiry, or by closing the browser or some other method of loosing the
> session with the server.
>
> Does anybody know how I can achieve what I'm trying to do - yes I could pop
> some JavaScript to detect closing the browser, but that doesn't account for
> loss of connection etc.
>
> Any help much appreciated.
>
> Wayne....
>
>
>
>
>




More information about the talk mailing list