0

How can I set a web application to have an infinite session, so that the user doesn't get logged out after some time, even if the web application stays open for years ?

Car981
  • 261
  • 1
  • 3
  • 11

2 Answers2

0

I think you should use COOKIE rather than SESSION, since SESSION only persists until browser is closed

or perhaps you might consider localStorage for HTML 5

willsantoso
  • 137
  • 1
  • 1
  • 9
0

It is not possible to set infinite SESSION on server-side because the session information is constantly deleted and creates new session accordingly

By using the function session_set_cookie_params we can set lifetime of the session cookie in seconds.

Refer to this : http://php.net/manual/en/function.session-set-cookie-params.php

laxonline
  • 2,657
  • 1
  • 20
  • 37