mesh2005 Posted May 12, 2008 Share Posted May 12, 2008 I checked the PHP configuration and I can see the session timeout is set to never expire, however; sometimes my application fails to read the Session variables. I keep a logged-in flag in the Session but it is empty after a while. I have to logout and re-login, please advice. Thank you AM Quote Link to comment https://forums.phpfreaks.com/topic/105227-sessions-expire-althought-i-set-them-to-indefinite/ Share on other sites More sharing options...
bilis_money Posted May 12, 2008 Share Posted May 12, 2008 please post the codes that relate to this problem. Quote Link to comment https://forums.phpfreaks.com/topic/105227-sessions-expire-althought-i-set-them-to-indefinite/#findComment-538817 Share on other sites More sharing options...
PFMaBiSmAd Posted May 12, 2008 Share Posted May 12, 2008 Also post the name of the setting you are talking about. Sessions are designed to hold data for the duration of one visit to your site. While you can set the session.cookie_lifetime and the session.gc_maxlifetime (requires you to set session.save_path to a private folder if you are on a shared server) to cause sessions to last as long as you want, you should be using a regular cookie to identify a visitor between visits to your site. Your session problem could be due to someone else on a shared severs using a short session.gc_maxlifetime or just the default session.gc_maxlifetime logging your visitors out by deleting the session data file if they are stay on one page for that amount of time or it could be due to a problem with one of your pages outputting content before the headers are sent. Quote Link to comment https://forums.phpfreaks.com/topic/105227-sessions-expire-althought-i-set-them-to-indefinite/#findComment-538901 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.