johnsmith153 Posted July 22, 2010 Share Posted July 22, 2010 Is it true PHP will only delete old sessions (garbage clean) based on % of page requests? So if one person logs in then doesn't log out, would the session always be active with no chance of garbage clean until there was some other page request? (imagine if nobody else visited the site) Quote Link to comment https://forums.phpfreaks.com/topic/208497-session-cleanup/ Share on other sites More sharing options...
sKunKbad Posted July 22, 2010 Share Posted July 22, 2010 ....(imagine if nobody else visited the site) If nobody else visited the site, I think you have bigger problems than some session data hanging out on your server. Quote Link to comment https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1089408 Share on other sites More sharing options...
johnsmith153 Posted July 22, 2010 Author Share Posted July 22, 2010 Idiot. What if it was in development and only the developer had access? This is a serious question and the efforts I am putting it to get the answer is costing time and money. By responding like this it shows that the post has had a response and is much less likely for someone to click on it (a lot of people click on the posts where no response is made to help these people first). You are an idiot and wasting my time. I need to know the answer. Does PHP only attempt garbage cleanup when page requests are made? I.e. does PHP not garbage clean itself, does it need an unrelated page request? I see the server variables which by default are set to garbage clean on 1/100 of requests and to clean after 1440 seconds. Does this really mean what I think? If so, what a strange way to do things. How about answering the question (correctly) and then giving any cocky answer you want? Quote Link to comment https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1089600 Share on other sites More sharing options...
timvdalen Posted July 22, 2010 Share Posted July 22, 2010 Idiot. What if it was in development and only the developer had access? This is a serious question and the efforts I am putting it to get the answer is costing time and money. By responding like this it shows that the post has had a response and is much less likely for someone to click on it (a lot of people click on the posts where no response is made to help these people first). You are an idiot and wasting my time. Dude, sure, he made a joke and you expected a real response, but this is a forum mostly filled with 12-yr-olds. And most important of all, it's free. If you want an answer that won't wast your time, pay for it. Quote Link to comment https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1089617 Share on other sites More sharing options...
johnsmith153 Posted July 22, 2010 Author Share Posted July 22, 2010 1. Attempts to garbage clean are only considered when session_start() is executed. 2. Then it uses the relevant settings to decide if it will attempt the garage clean. Default 1/100 means gc will only run on 1% of page requests (and only where session_start() is called). 3. Garbage clean (if it is ever executed based on 1 and 2) can take up quite a lot of the server's resources when conducting the task. Quote Link to comment https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1089626 Share on other sites More sharing options...
sKunKbad Posted July 23, 2010 Share Posted July 23, 2010 Idiot. What if it was in development and only the developer had access? This is a serious question and the efforts I am putting it to get the answer is costing time and money. By responding like this it shows that the post has had a response and is much less likely for someone to click on it (a lot of people click on the posts where no response is made to help these people first). You are an idiot and wasting my time. Dude, sure, he made a joke and you expected a real response, but this is a forum mostly filled with 12-yr-olds. And most important of all, it's free. If you want an answer that won't wast your time, pay for it. Exactly. Also, if you expect any real help, you might watch your insults. Quote Link to comment https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1090336 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.