Unable to login Drupal - Access Denied

If you have problem login to Drupal after some configuration changes or update, you can try the following steps:

  • Try login using different browser, if you can login using another browser, likely a cookie problem.
  • Clear the problem browser cookie of your site
  • Try login again

If the above does not work, you can try edit sites/yoursite/settings.php

  • specify the $base_url
  • OR this fix to comment out the cookie section

Happy drupal-ing Smile

  1. Anonymous (not verified) on Fri, 15/07/2011 - 3:43am

    THANK YOU. Saved me much aggravation. Was trying to go through and change password in MySQL, but ran into your post just in time.

  2. Jaymie (not verified) on Mon, 18/04/2011 - 4:29am

    I had this problem and none of the solutions about or on Google fixed it. In my case, I was using CKEditor and there were three domains which could point to the site. In the Drupal settings.php file, there's a line which starts

    $cookie_domain

    some features of CKEditor require this, but it meant that when I accessed the site on a domain different to the one set here, I got 'access denied' even when logging in as admin.

    To fix this, I set some redirects in the .htaccess file so that all access to the website would come through the one, authorised domain. Job done.

  3. HAg (not verified) on Wed, 09/06/2010 - 5:10pm

    You made my day. Thank you.

  4. Dawn (not verified) on Wed, 14/04/2010 - 3:57am

    Exellent, removing cookies worked for me. Strange things can happen with cookies when you're regularly changing code and updating files ...
    Thanks
    Dawn