I've migrated my client's Craft site to a new host. On the front end the site is fine and working as it should.
The problem is with the Craft admin area. I can login, but once logged I can’t access anything other than the main dashboard screen. Clicking any of the links within the dashboard brings up the login screen.
One thing I did try was to remove the cpTrigger
I’d set in /craft/config/general.php. For a moment I thought this had worked. I could access other areas of the dashboard, but then the dashboard logged me out after a minute or so.
I’ve seen a few other posters with similar issues and have tried solutions that worked for them…
I’ve delete the contents of craft/storage/runtime
.
I’ve checked the file permissions of craft/storage/runtime
. They are currently set to 774.
I’ve tried adding the following to craft/config/general.php:
'overridePhpSessionLocation' => false
As described here - Craft constantly logging out from admin area
and also:
'overridePhpSessionLocation' => true
As described here - Migrated Server, Now Getting Logged Out Constantly
I’ve tried 'requireMatchingUserAgentForSession' => false
too.
Nothing has worked so far.
Is there anything else I could try?
I understand this is likely to be related to permissions for where session files are stored. Are there any questions I should be asking the the hosting company in relation to this? The site is on a shared hosting account.
Any help or advice with this much appreciated.
* An update... *
I looked at /admin/utils/phpinfo
in the dashboard to check where session.save_path
is pointing.
By default it's set to /tmp
.
If I add 'overridePhpSessionLocation' => true
to craft/config/general.php
, the session location is set to:
/var/www/vhtdocs/xxxxxxxx/craft/storage/runtime/sessions/
/tmp
That looks a bit odd to me? There are two paths – the craft path and the default session path below it. Is that correct?
phpinfo()
from a script directly. – Brad Bell Nov 21 '17 at 16:41