We have a PHP app (SilverStripe) on a cPanel LAMP shared hosting server. The CMS user is losing their session every couple of minutes. Here are some session settings based on phpinfo()
on the hosting platform:
session.gc_maxlifetime = 0
session.gc_divisor = 100
session.gc_probability = 1
session.save_handler = files
session.save_path = /tmp
session.cookie_lifetime = 0
There is no session management in the PHP code. In fact SilverStripe CMS actually pings the server every 5 minutes to keep the session alive but timeouts are happening way before then.
What could cause this?
Check out php.ini the value set for session.gc_maxlifetime
is the ID lifetime in seconds.
I believe the default is 1440 seconds (24 mins)
http://www.php.net/manual/en/session.configuration.php
Edit: As some comments point out, the above is not entirely accurate. A wonderful explanation of why, and how to implement session lifetimes is available here: