I know many other folks have posted this question over the years, but unfortunately none of the answers given so far are fixing this for me.
The problem: after logging-in on my staging server (this does not happen locally with MAMP), after a minute the "Your session has ended" modal comes up. Entering my password dismisses the modal for a second then it comes right back.
If I simply reload the page, I am still logged-in, but the modal will come back after another minute. Also, reloading causes my Craft identity cookie to keep its name but change its value.
If I look in /craft/storage/runtime/sessions, I can see that when the modal comes up, a new session file has been created, but is a 0 length file. All the session files have 600 permissions.
What I've tried/checked with no success:
session.auto_start = 0is already set in the php.ini
session.save_pathshows up correctly as
- have tried both the
requireUserAgentAndIpForSessionconfig variables set to
- have deleted and recreated the sessions folder manually with 777 permissions
- have deleted the sessions folder and let it be recreated by Craft (was created with 775 permissions)
- I am not using any CDN/caching, or running this on Vagrant.
The server is running Apache/2.2.3 (Unix) and PHP 7.1.0.
Is there anything else I can try?