Access Denied on Login

Tagged:  •    •  

Another infamous Drupal problem.

So okay, when you try to login, you are either returned to the login screen and/or get Access Denied. When you check your watchdog table, you notice two logins, one for yourself and the infamous user 0. And the session table lists at least two current sessions for your ip address.

In my case, it was probably caused by my creating a backup of my database while I was logged in and then downloading it to use on another site. It is caused by the browser storing multiple cookies for your drupal site.

The fix, using the developer toolbar in Firefox, delete all the session cookies. You may find yourself already logged in when you try your site. So logout then log back in. Everything should be fine.