Cannot login after update to 3.7.1 - Cookies need to be enabled

Cannot login after update to 3.7.1 - Cookies need to be enabled

by Jani Kivisola -
Number of replies: 1

Hi, I did update from 3.3.9 to 3.7.1 and everything seemed to go fine, but I can't login now. On login screen it says that cookies should be enabled. I've tried with Chrome and Firefox. The cookies are enabled. I have emptied browser caches and tried to add following line to config.php

$CFG->disablelogintoken = true;

but nothing seems to help.

After I try to login, the path seems to go to this:

/login/index.php?testsession=3113

I don't know if it makes any difference.

Can anyone help?


Average of ratings: -
In reply to Jani Kivisola

Re: Cannot login after update to 3.7.1 - Cookies need to be enabled

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Perhaps whatever is being used for session handling isn't working.

By default this uses a folder in Moodledata (sessions) so maybe there's a problem writing to this. But check to see if $CFG->session_handler_class is in config.php specifying a different handler, e.g. Memcached or Redis. The database can also be used for session handling and this can be set in the database, you can check this with the query SELECT name, value FROM mdl_config WHERE name = 'dbsessions'.

Have you got any non-default session cookie settings in Moodle? You can check this with the query SELECT name, value FROM mdl_config WHERE name LIKE 'sessioncookie%'. The help for the sessioncookiedomain setting says "an incorrect value will prevent all logins to the site".


Average of ratings: Useful (1)