jodleren schreef:
Hi
Hi Jodleren,
I am wondering what goes wrong...
I have
session_cache_expire(30);
session_start();
How can I check whether the _last_ session (from e.g. yesterday) has
ended?
You cannot, unless you use own sessionhandlers.
http://nl3.php.net/manual/en/functio...ve-handler.php
My problem is, that once logged in, it remembers it forever. All
$_SESSION variables will stay and will confuse my software next time
they open a browser again, as it can see that the $_SESSION data are
still present...
Possibly this happens because nobody else use that site.
Sessions are destroyed besaed on a random generator.
On the top of my head it is dafault configured with a chance of 1/100
the system will check for stale sessions.
This means that EVERY request to PHP has a 1/100 chance of firing the
session-garbage collection.
Check you php.ini for excact sessting (or use phpinfo()).
Is there a way to get to know, that the session has ended, or the
browser has been closed?
Browser close? No.
Session ended? Yes, with proper session_save_handler (via a db eg).
Regards,
Erwin Moller
>
WBR
Sonnich
--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare