If it’s happening every couple of minutes, you probably have the date/time set incorrectly in ExpressionEngine, or on your computer, or both. Either can make cookies expire prematurely. Gilles, if it just started and was working before, my first question would be: what changed?
Derek, you’re absolutely right. I just posted here to see whether somebody has encountered this before and found a solution. After some trial and error, I think I rectified it: I switched the authentication to cookies and session which seems to have improved the situation.
I verified the date settings as you suggested but as I mentioned, this is all as it was (UTC).
Alas, probably something else has changed that I’m not aware of through the host, but the bizarre thing for me is that I have 3 different ExpressionEngine instances running on the same VPS and only 1 of them started having this issue.
As to what happens when: I log into the admin panel, and after about 2-5 minutes, clicking on a link throws me back to the login screen. I verified the cookie expiry but that’s 2 days into the future, so it’s not that the TTL of the cookie is set to 2 minutes only.
Interesting. Double check your cookie settings and .htaccess as well. Browsers don’t share cookies by subdomain by default, including www / no-www. So for instance if your visit your site and log in with www.
but your site URL is configured without it, links will be built without the www.
and your cookies won’t be shared. To make sure your cookies are shared across all subdomains, the Cookie Domain setting should begin with a dot, e.g. .example.com
. Also your .htaccess should make www or no-www canonical. If you need more help diagnosing, pop in a support ticket and we’ll be happy to troubleshoot your environment directly. If you have a valid license on your account and haven’t used our support system before, you get the first three months free.
Thanks for the tips Derek. The site always redirects to www but I will double-check the .htaccess to see whether anything has changed there. It could be that the host changed something to the overall PHP config that I don’t have access to.
If the issue continues, I will set up a support ticket. Thanks!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.