6

The problem seem to be that the session file in /craft/storage/runtime/sessions is getting removed any time I refresh the actual page, so that I have to do a new login everytime I've changed content, looked at the site, and then want to add more content.

This i running on Apache, PHP 5.3.29, locally through MAMP on Yosemite.

Is there some config setting I'm missing here?

nicael
  • 2,382
  • 7
  • 27
  • 48
megatrond
  • 1,342
  • 6
  • 15

2 Answers2

10

The problem was actually Chrome using iOS emulation when viewing the site, thus spoofing the UA string into something different than the usual Chrome UA string when logging into the admin area.

Solution (as suggested by @craftcms on Twitter) was to set:

'requireMatchingUserAgentForSession' => false

In

craft/config/general.php

For whatever environment you are having the issue.

megatrond
  • 1,342
  • 6
  • 15
2

As Brad Bell mentioned in this answer:

It can be that wherever Apache/PHP is configured to save session files doesn't exist or isn't writable.

If you've got the overridePhpSessionLocation config setting set to true, then that will be in craft/storage/runtime/sessions folder.

Simon East
  • 890
  • 6
  • 21