michaellunsford Posted June 22, 2006 Share Posted June 22, 2006 [code]session_set_cookie_params(60*60*24*180,"/",".".$_SERVER['SERVER_NAME']);session_start();[/code]So, the session cookie is set to expire in 180 days, but the server kills it after a few hours. can session_cache_expire() fix this, or do I need to change something in the php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/12607-session-expiration-question/ Share on other sites More sharing options...
trq Posted June 22, 2006 Share Posted June 22, 2006 Honestly... if you need to store your sessions more than an hour you need to use cookies. Dont foget sessions take up room on the server aswell. Quote Link to comment https://forums.phpfreaks.com/topic/12607-session-expiration-question/#findComment-48346 Share on other sites More sharing options...
michaellunsford Posted June 22, 2006 Author Share Posted June 22, 2006 I am recording whether a visitor is allowed access to a certain area of the website without requiring them to login. I could store the sessionid in mysql, but the complexities begin: can I capture the PHPSESSID cookie and verify the existance of that session on the server before running session_start?If the session does not exist, I could query mysql for the content and repopulate the new session -- but this does seem like the long way around. Quote Link to comment https://forums.phpfreaks.com/topic/12607-session-expiration-question/#findComment-48350 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.