Search code examples
.htaccessdrupaldrupal-7access-denied

Access Denied on all Admin Pages in Drupal 7


I have installed Drupal 7 on a sub domain caihr.sieaegroup.com. I closed the browser and now am unable to log in to any of the admin pages. I get no login form and I am not using the default theme.

I have cleared cookies, tried different browsers but nothing works. Am I missing something? Do I need to update the .htaccess file?

This is the second time I have been down this road. The first was to reinstall drupal and start from scratch without logging out or closing the browser but I feel this is not the right solution.

Any Help is welcomed.


Solution

  • If you logged out and default theme can't provide proper login form you have to change to some functional theme and then login:

    https://www.drupal.org/node/200774

    It says:

    activate a trusted theme

    UPDATE system SET status=1 WHERE name = 'garland';
    

    change the default setting

    UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';
    

    clear the cache tables

    TRUNCATE cache;
    TRUNCATE cache_bootstrap;
    TRUNCATE cache_block;
    

    Use phpMyAdmin or some similar tool to execute queries.