HAN! Posted October 29, 2007 Share Posted October 29, 2007 i made a login page, and i made a logout button too, but i want to make a timed logout, i mean after 5 min for example the user is logout automatically thanxs Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/ Share on other sites More sharing options...
trq Posted October 29, 2007 Share Posted October 29, 2007 Sessions automatically expire by default of 20 mins. if you have access to the php.ini file you can however change this setting. Take a look at the sessions section. Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380307 Share on other sites More sharing options...
HAN! Posted October 29, 2007 Author Share Posted October 29, 2007 Document expires after n minutes. session.cache_expire = 180 Is this which i have to change?? Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380310 Share on other sites More sharing options...
trq Posted October 29, 2007 Share Posted October 29, 2007 Yeah, thats it. seems its 180 minutes, not 20 like I said. Wierd. Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380311 Share on other sites More sharing options...
HAN! Posted October 29, 2007 Author Share Posted October 29, 2007 i changed for 1 and i waited for 3 minutes but nothing happened, is there a way to do it using php codes inside the script? Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380314 Share on other sites More sharing options...
trq Posted October 29, 2007 Share Posted October 29, 2007 You need to restart the server for any php.ini changes to take affect. Also.. how are you testing this exactly. Nothing will happen by itself. Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380317 Share on other sites More sharing options...
HAN! Posted October 29, 2007 Author Share Posted October 29, 2007 i know nothing well happen byitself i have a login page using session and im testing it there, also with restarting the server nothing happened, isn't there any way to do this with a function inside the script??? Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380320 Share on other sites More sharing options...
lill87 Posted October 29, 2007 Share Posted October 29, 2007 You need to restart the server for any php.ini changes to take affect. Also.. how are you testing this exactly. Nothing will happen by itself. How to make the user logout if his session.cache is expired then? Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380321 Share on other sites More sharing options...
cooldude832 Posted October 29, 2007 Share Posted October 29, 2007 your log in session based so if the session ins't set on protected pages it should automatically revert to your login script, at least 99% of the session based logins I haev seen do this Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380323 Share on other sites More sharing options...
trq Posted October 29, 2007 Share Posted October 29, 2007 How to make the user logout if his session.cache is expired then? This happens automatically. Quote Link to comment https://forums.phpfreaks.com/topic/75197-timed-out-logout/#findComment-380327 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.