Jump to content

Recommended Posts

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)

Link to comment
https://forums.phpfreaks.com/topic/208497-session-cleanup/
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1089600
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1089617
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1089626
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/208497-session-cleanup/#findComment-1090336
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.