How to fix "Access Denied" message locking out admins?
Yikes! A client's site suddenly turned up "Access Denied" for admins – up, down, and all around. Attempts to log in as almighty User ID 1 would simply spit the login screen right back again, or appear to "take" momentarily, yet return "Access Denied" for any following admin action.
Some horrible flub-up with user permissions? Can't even check and troubleshoot when the site won't let the admin in! And playing with cache, cookies, and other browser fiddly bits wasn't doing the job.
Question answer
I expected major pain to result. But a search of the Drupal site quickly turned up this gem:
http://drupal.org/node/6696#comment-198054
Just a little addition to my INDEX.PHP file. I tried it, and Huzzah! Back in logged-in action.
The cause of the problem? Perhaps this:
http://drupal.org/node/6696#comment-204960
Hmm, could it be that the ISP had updated PHP from 4 to 5? Yes, it seemed so! (Maybe now I'll start to pay attention to their newsletters.)
So the thread addressed my woe, and I'm a happy Drupaller all over again. Now, this particular case had a Drupal 4.x site knocked out of action by a PHP upgrade, so it may not apply directly to many users' situations. But if you're getting "Access Denied" hate (on 4.x or 5.x), give the linked thread a peek.
My thanks to everyone offering help on the topic, especially Drupal Gods kweisblatt and johnchalekson!













Post new comment