Home

Primary links

  • top o the deck
  • Drupal for Beginners
  • about
  • links
  • give me some sugar

Drupal stuff

  • EDAM
  • STARDOM
  • Question Bank
  • Drupal musings
  • Drupal tips
Home

Key stuff on this site

Easy Drupal Admin Manual (EDAM)

SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)

Drupal for Beginners

Subscribe to posts by RSS or email

Subscribe to Drupal Ace by RSS feed RSS feed 

Subscribe to Drupal Ace by Email

Donate towards my web hosting bill! Get a great host!

Share and save

Share/Save

Random piece of content

!How to hide a node title?

Manuals on this site

  • Easy Drupal Admin Manual (EDAM)
    • Welcome to Your Site
    • First Steps: Please Read!
      • Understanding These Instructions
      • Important Terminology!
      • Best Practices for Site Admins
    • Super Quick Guide (for the experienced and the brave)
    • Logging In
    • Your Administrator Tools
    • Setting Site Basics
      • Setting Site Information
      • Configuring Your Theme
    • Creating Content
      • Node Types
      • Create a Page Node
      • Create a Story Node
      • Create a Blog Entry Node
      • Making Images and Other Files Available
      • Using Text and Image Editors
    • Organizing Your Content
      • Terms, Vocabularies, and Taxonomy: "Tagging" Your Content
        • Taxonomy Suggestions
      • Menus, Links, and Paths: Navigating the Site
        • Content Paths and URLs
        • Creating Links
        • Working with Menus: Administration Form (Drupal 6)
        • Working with Menus: Administration Form (Drupal 5)
        • Creating Menu Items on the Fly
        • Placing Menus on Your Pages
      • Placing Content on pages
        • Creating a page from a Single Node
        • Creating a page from a List of Nodes
        • Setting the Front Page
      • Working with Blocks
    • Maintenance Stuff
      • Maintenance and Construction Notices
    • Other Fun Things
      • Changing Color of Garland Theme
      • Free Aliases!
  • SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)
    • Set a Clear Goal
    • Make a Good Site
      • Put out the Welcome Mat
      • Make Great Content
      • Build a Great Brand
      • Make Navigation Easy
      • Tune Site Performance
    • Drive Traffic
      • Promote your Site
      • Get Found with SEO
    • Build a Community
      • Build an Offsite Community
    • Monitor and Improve
    • One-Page Checklist
    • Drupal and the Blogging Starter Checklist
      • Drupal and the Blogging Starter Checklist, Part 1
      • Drupal and the Blogging Starter Checklist, Part 2
      • Drupal and the Blogging Starter Checklist, Part 3
      • Drupal and the Blogging Starter Checklist, Part 4
      • Drupal and the Blogging Starter Checklist, Part 5
      • Drupal and the Blogging Starter Checklist, Part 6
      • Drupal and the Blogging Starter Checklist, Part 7

Recent comments

  • It worked

    adding $GLOBALS['tempUser'] = $user; worked but I find it worth noting that I had to delete...

  • very good document...

    very good documentation for beginners!!!!!! thanks!!

  • del penitential 62

    strike out abject
    eliminate penitent 5

  • Chat

    Thank you a lot about very beneficial to my work was very useful thank you

  • Drupal Resources f...

    I would start learning from the "Diving In" section above. That links to the good beginners'...

more

How to fix "Access Denied" for admins?

Submitted by Drupalace on Sat, 2007-09-29 00:41
  • Drupal
  • login
  • answered question

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!

Share/Save
  • Printer-friendly version
Neuron Genesis's picture

It worked

Submitted by Neuron Genesis (not verified) on Fri, 2010-09-03 01:23.

adding $GLOBALS['tempUser'] = $user; worked but I find it worth noting that I had to delete cookies first

  • reply
Homa's picture

Same problem

Submitted by Homa (not verified) on Sat, 2009-09-19 06:26.

I have the same problem. Did you find any solution?

 

Thanks,

Homa

  • reply
Drupalace's picture

Yes, a fix

Submitted by Drupalace on Wed, 2009-09-23 16:38.

If I recall correctly: Per the link in the article, adding 

drupal_page_footer();
$GLOBALS['tempUser'] = $user;

to the end of the index.php file did the trick. That was Drupal 5.x for me, though, long ago, and concurrent with an upgrade from PHP 4 to 5 by my webhost. So it may be a useful fix for you, if you happen to be under those same conditions. 

 

  • reply
Geir's picture

Re: How to fix "Access Denied" for admins?

Submitted by Geir (not verified) on Thu, 2008-07-31 18:12.

Didn't do it for me.
I can log in as user 1, but gets access denied to all the admin-stuff..

  • reply
Drupalace's picture

Re: How to fix "Access Denied" for admins?

Submitted by Drupalace on Thu, 2008-07-31 22:26.

Ack, that kind of thing is frustrating as heck. I imagine there are many, many little ways that an installation can get screwed up and deny access.

The best immediate step you can take is to throughtly search the Drupal.org forums for more possibilities, and beg for help if nothing good turns up. All of which you've probably already done... : (

  • reply
Unknown Drupaloid's picture

Re: How to fix "Access Denied" for admins?

Submitted by Unknown Drupaloid (not verified) on Mon, 2008-01-07 02:59.

Thank you! My ISP just upgraded their default PHP installation to 5 on 1-1-08. Thank you for sharing this.

  • reply

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><br><p>
  • You may quote other posts using [quote] tags.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options


Relevant Content

The Drupal Ace logo has dealt these content suggestions from the deck.

  • Working with Menus: Administration Form (Drupal 6)
  • Logging In
  • Newbie Emergency #1: "I'm locked out!"
  • Forum Finds: Modify length of user login sessions
  • Drupal beginner documentation picking up steam
  • Working with Menus: Administration Form (Drupal 5)
  • Updating Easy Drupal Admin Manual

Learn Drupal, hands-on

Get the beginner-friendly ebook that teaches community site building via a live case study.

Drupal 6 Ultimate Community Site Guide

Read the review

Drupal mini tip

Site visitors seeing your ugly error messages on the screen (along with details of your Drupal installation path)? Once your site goes from dev to launch, you probably want to have errors recorded in the log but not splashed across the screen. Head to the handy Error Reporting settings found at admin/settings/error-reporting. 

It's a deal!

Dreamhost dealsDrupal Ace presides over his domain, proudly ensconced in his DreamHost eyrie. Won't you join me?

Promo code deal!

Just enter the code 49ER when you register for an account, and save $49 off the already-low price. No strings!

Read my hosting service review

Powered by Drupal, an open source content management system

Copyright 2007 and forever after. Made with Drupal, of course. On OS X, of course. Served up by DreamHost. DreamHost

RoopleTheme