I just installed 4.3.1 and I hink I have done everything right but I get a home page that lets me create a new account but nothing else.

I can create accounts but whenever I log on or even just go to the home page it gives me a page that says "Access denied", "you are not authorized to access this page"

Can anyone please help. I've checked and double checked everything I can think of.

thanks

Comments

walkah’s picture

you need to go to http://yoursite.com/drupal/?q=admin/user/permission and enable 'access content' (and probably some others) for anonymous and/or authenticated users.

--
James Walker :: http://walkah.net/

dotun’s picture

I get the same "access denied" page when I go to http://yoursite.com/drupal/?q=admin/user/permission or any other page

drumm’s picture

Log in as the first user you created. This account is the "superuser" account and can access/admin anywhere. Use that account to set up the permissions so others can access things.

joeintenn’s picture

This is the error I get. I have followed the install to the letter:

Warning: Access denied for user: 'root@localhost' (Using password: YES) in /var/www/html/drupal/includes/database.mysql.inc on line 12

Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: YES) in /var/www/html/drupal/includes/database.mysql.inc on line 12
Access denied for user: 'root@localhost' (Using password: YES)

Any help on this would be great. Thanks in advance.

billbest’s picture

Joe

The error message is telling you that the password for the user root@localhost is wrong.

Check /var/www/html/drupal/includes/conf.php and look for this line near the top of the file:

# $db_url = "mssql://user:password@hostname/database";

Make sure that you have entered the correct username/password combination and the address of where your database is.

In the same file, make sure that this line:

$base_url = "http://localhost";

is set correctly. On mine, I had to enter the fully qualified qualified URL of where my Drupal set-up lives i.e. http://external.domain.name/drupal as it didn't work using localhost.

HTH

Bill

casper27’s picture

Hello drumm, i can get same "Access Denied" when i login with firust user..

When i after setting and save, i redirect to "Access Denied" page, and last settings is not saved.

Please guide me

dotun’s picture

I found the solution. Actually posts http://drupal.org/node/view/4658 and http://drupal.org/node/view/4395
solved the problem.

my version of apache2 (SUN) uses php4_module instead of mod_php4

(LoadModule php4_module        modules/libphp4.so)

so the conditional overide was not working right.

# Overload PHP variables:
<IfModule mod_php4.c>
   php_value magic_quotes_gpc        0
</IfModule>

I commented out the and things work fine now.

thanks all

jbro’s picture

Can you please tell me what file you comment those out in? I am having the same problem and am guessing I'm on a Sun Server.

laituancuong’s picture

In my site http://www.crmvietnam.com, I can't access some articles (nodes) although I loged in by administrator.
Finally, I find out that cause I deleted some users that posted those articles. After restore the old users, everything is done.
Hope helpful!

jagzr’s picture

Here Problem is Little bit Different !!
Actually my site is working properly perfect at my "localhost", but when i use my IP Address instead of localhost, i get error Access Denied "You are not authorized to access this page error" whenever i login to to my site..

Plzz Help me over here...

kcolwell’s picture

Hi,

After moving a site to a laptop to do some testing I could no longer login as Admin... The fix was to change the following setting in settings.php

ini_set('session.cookie_domain', '127.0.0.1');

I hope this saves someone else some time.

drupal on!

kc

tarapynka’s picture

Thank u so much !!!

Your post really saves time ))

sunchaser’s picture

I had this too.
Moved my site to a new domain.

change this in settings.php

$cookie_domain = 'newdomain.com';

write2David’s picture

This solved my problem as well. Thanks for the hint!

admin@virtualservices.in’s picture

Hi,

I have moved site from Live to localhost and now getting Access Denied on all the pages for anonymous user only.Rest logged in user works properly.

I have tried all the option stated above but not working.

gokulnk’s picture

Add
//
$GLOBALS['tempUser'] = $user;
//
after the
//
drupal_page_footer();
//
near the end of the index.php

So finally it should look like
//
drupal_page_footer();
$GLOBALS['tempUser'] = $user;
//

and don't forget to clear your cookies.

MdWaseem’s picture

"You are not authorized to access this page" i want to replace the text with "You should get register to access this page"... So how will i do it please help me out am new to Drupal

gokulnk’s picture

Use http://drupal.org/project/stringoverrides module. It does exactly the same.

CosmaP’s picture

Hello All,

I have copied a site from one location (domain name) to a new one (domain name) so that I can make some changes for testing.
Now I get the "Access denied You are not authorized to access this page." on both sites!!

Arrgghhh!!!

I have access to the SQL database and all the back-end files.

All ideas appreciated.

Thanks all.

SiteFish’s picture

Hi

After upgrading from Drupal 6.16 to 6.22 I couldn't log back in again. Even user1 got the sad message "You are not authorized to access this page". The password was ok since I only got an error message when I deliberatly used a wrong passwort (for testing purposes). I tried all the good avice I could find on Google, such as appending the index.php file and using alternative browsers. Apart from getting to know a bunch of new browsers, it didn't do me any good. Until I came across this little gem in the Drupal API section.

http://api.drupal.org/api/drupal/developer--globals.php/global/cookie_domain/6

It says:

Cookie domains must contain at least one dot other than the first (RFC 2109). For hosts such as 'localhost' or an IP Addresses the cookie domain will not be set. Example provided in settings.php file is not proper for Drupal 6.17 and above, correct version:
# $cookie_domain = '.example.com'; // there's . before example.com

Since I don't want to retype all the changes I've made to settings.php at each minor upgrade, I usually leave the file unchanged. That meant my cookie domain was no longer correct. After changing

$cookie_domain = 'http://www.example.com';

to

$cookie_domain = '.example.com';

everything was back to normal.

However, I do think that Drupal should warn users if the configuration files change between minor releases. I'm probably not the only one to keep the old configuration files when upgrading.

CosmaP’s picture

I will hold that in mind.

I managed to get it working by remming out the $cookie_domain line.

I will give this ago.

Thanks

scott.browne’s picture

I found this error when I copied a website template to another site. I forgot inside the settings file to rename the cookie domain to the new site. It would give me access denied errors similar to the OP.

kingfisher64’s picture

Solution

Just in case somebody stumbles over this issue the solution for me was in settings.php.
I had copied a website from one domain to another and had not changed the following setting at the bottom of the file.

$cookie_domain = 'newwebsitenamehere.com';

gamerastreator’s picture

Thanks , this post help me a lot

EliteEnvy’s picture

this answered my question as well. thanks!

Elvin - Albania Drupal Developer’s picture

thanks a lot! this saved me over 1 hour of wasted efforts :)
God bless you

bsbhimsingh’s picture

http://example123/drupal/#overlay=admin/people/permissions

Go to Node Option

View published content Click on Check box.

more..

http://meramandi.blogspot.com/2015/04/blog-post_14.html