PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
this is the worst way to logout users automatically. what you need to do is set a timestamp on a db column and every time a user makes an action the requires authorisation, you update that field and simultaneous you check that timestamp against current time and if its been too long, then you log them out.
Thanks for your fast reply, but I didn't explain properly.
I really do not want them to log-out automatically. In fact this is a problem for me.
I want to set the automatic timeout as long as possible (that's why I set session.gc_maxlifetime to 50000).
But it doesn't log-out after 50000 seconds, but long befor (about an hour after log-in), and I do not know why...