johnsmith153 Posted February 20, 2009 Share Posted February 20, 2009 Can someone explain the whole session clean up / max life of a session thing. I have searched google/internet a lot - so please don't just post a link to php.net!! I suppose I want to know how to control: (1) when PHP automatically clears up individual set $_SESSION variables within a user's logged in occasion (ie like unsetting one session) (2) when PHP logs you out automatically for inactivity and clears the entire session (ie like session_destroy) I think the php.ini settings that cover this are: session.gc_maxlifetime session.cookie_lifetime Is there a known problem for shared servers against dedicated - where you don't have control on a shared of something? (I heard something about this) How is the best way to set all this up so I can control the 2 things mentioned? (I am sure in the past I have ignored this because it doesn't work - but that could be the shared server problem) Quote Link to comment https://forums.phpfreaks.com/topic/146142-php-clean-up-of-old-sessions/ Share on other sites More sharing options...
allworknoplay Posted February 20, 2009 Share Posted February 20, 2009 Do you have ROOT access to your server or is it hosted and shared with other people? Quote Link to comment https://forums.phpfreaks.com/topic/146142-php-clean-up-of-old-sessions/#findComment-767225 Share on other sites More sharing options...
johnsmith153 Posted February 20, 2009 Author Share Posted February 20, 2009 At the moment it is shared, but I am looking to move to something else in next few days - could be dedicated/VPS/cloud - decision could depend on this + other things. There is a good budget for new server. Thanks for replying. Quote Link to comment https://forums.phpfreaks.com/topic/146142-php-clean-up-of-old-sessions/#findComment-767229 Share on other sites More sharing options...
johnsmith153 Posted February 20, 2009 Author Share Posted February 20, 2009 Does it make a difference? Should this affect my decision? Quote Link to comment https://forums.phpfreaks.com/topic/146142-php-clean-up-of-old-sessions/#findComment-767286 Share on other sites More sharing options...
premiso Posted February 20, 2009 Share Posted February 20, 2009 Shared would effect your permissions. I do not know if they allow htaccess, but you can try setting them there. I would also change the session save folder to be located inside your portion of the host so no one can hi-jack sessions easily. Again I do not know how much your host allows, but yea. You can always email them and ask. Quote Link to comment https://forums.phpfreaks.com/topic/146142-php-clean-up-of-old-sessions/#findComment-767288 Share on other sites More sharing options...
allworknoplay Posted February 20, 2009 Share Posted February 20, 2009 At the moment it is shared, but I am looking to move to something else in next few days - could be dedicated/VPS/cloud - decision could depend on this + other things. There is a good budget for new server. Thanks for replying. I like the VPS route. It's your own server, maybe slow(??) but won't cost as much as dedicated server. Quote Link to comment https://forums.phpfreaks.com/topic/146142-php-clean-up-of-old-sessions/#findComment-767296 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.