|
Posted by Gordon Burditt on 10/21/05 00:48
>On my site people have to log in and automatically start a session. An
>authorized login grants access to other pages and MySQL data.
>However when the user waits to long,
>the server ends the session,
*WHICH* server ends the *WHAT KIND OF* session? I presume you mean
MySQL server and the connection to it, not http server and PHP
$_SESSION, here.
>without a
>proper logout. The user can't see that he is logged out, hits a button and
>gets
>mutiple errors because MySQL is no longer available.
I'd like to suggest re-establishing the MySQL connection, if possible,
if it has timed out. Then there's no need to warn the user.
>Is there a way to to warn the user a minute before the session is ended?
PHP runs server side. You can't push data to the browser. You could
tell the user his session has timed out, but it's a little late at
that point. Javascript is Turned Off(tm).
>I just read, the session time is set in session.gc_maxlifetime in php.ini.
The maximum idle time for a MySQL connection is set in my.cnf or
a server default.
Gordon L. Burditt
Navigation:
[Reply to this message]
|