0

As php sessions get stored on the server, I would like to know how long they last after the client side cookie has been deleted?

How does the server know the browser has been closed and that it should delete the sessions that relate to the clients ID?

I ask this because i am storing a large array in a session for each visitor to the website. I am worried about to much data collecting on the server.

user2129024
  • 411
  • 4
  • 8
  • http://php.net/manual/en/session.configuration.php Those settings control sessions, including server-side lifetime. The "server" knows NOTHING about php sessions. every web-based PHP invocation has a random chance to fire up the session garbage collector and do a cleanup, which simply removes any "stale" session files. That effectively destroys the session, even if the client-side cookie is still alive. – Marc B Aug 23 '16 at 15:51
  • Thanks that helps – user2129024 Aug 30 '16 at 12:43

0 Answers0