Thursday, March 20, 2014

Drupal - access denied page after login

Today I got an access denied page after login, just rerooting me to the login page. I 've got this before, on a number of very different sites. Usually this problem coincides with big other problems in the website concerned, so you really can do without this annoying access problem.
There can be an infinite number of causes: Crashed sessions table, changes in apache, php upgrades, butterflies in Australia....
Here is my short track to quickly regain access to the site:

Solution 1
Truncate the sessions table and then try again

It is perfectly save to truncate the sessions table although all currently logged in users are then logged out.  The sessions table keeps track of all user sessions on your site. It has an entry for every user/browser combination that's logged in to your site. (Logging in from firefox and from chrome creates two entries in this table, and the same goes for logging in from different devices)

Solution 2
Add cookie domain setting to your settings.php file, like this
$cookie_domain = '.mydomain.ext';
And then try again

(see also

Solution 3
When your sessions table is crashed, simply repair table and try again

Solution 4
Find a religion that suits you bests and make an offering to the God or Gods who are proclaimed to be most helpful to developers by this chosen religion.....

No comments:

Post a Comment