Archive for the 'Drupal' Category

Access Denied You are not authorized to access this page Drupal Sites

Saturday, February 24th, 2007

It seems to be commonest form of error that you’ll face with Drupal site, and, it is hard to believe your own eyes the way this error appears all of a sudden absolutely from nothin.

I have seen this particular Drupal Error message appears under different situaltions.

1. After a fresh installation when someone tries to login to his Admin Account.

2. After an upgrade from an old Drupal version.

3. After moving a Drupal site to a new host.

4. Even after logging in to your Admin Account, you may not able to Administer site for that Access Denied error message.

5. And sometimes, it comes from nowhere all of a sudden.

So, I followed a long thread in Drupal.org in this issue and finally have found an easy solution, hope it is the master patch for all the above cases.

Now here goes how to get rid of this error???

  • Firstly, you need PHP Version 5.2.0
  • Now open session.inc file found under /includes directory
    • Around Line #17 find this :
    • function sess_read($key) {
      global $user;
  • Now paste one line of code below that line:

register_shutdown_function(’session_write_close’);

  • Now save and upload session.inc file.
  • Hope this will resolve the issue.

Please visit WP-Admin > Options > SPA and enter the key. Don't have a key? Signup here