Reply to Re: automatic logout before SESSION end

Your name:

Reply:


Posted by Chris Stegeman on 10/21/05 01:04

Thanks Gordon, but it is in fact the http server (apache) that ends the PHP
$_SESSION!
The SQL errors occur because the user has no rights anymore to connect to
the MySQL server when the $_SESSION has ended.
I was hoping the http server would send some kind of alert, before ending
the PHP $_SESSION

Chris

"Gordon Burditt" <gordonb.vg7c9@burditt.org> schreef in bericht
news:11lg44vh7fha329@corp.supernews.com...
> >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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация