Hello. I googled around and found a few thousands topics about problems after moving drupal websites, and another few thousands about access denied to certain pages, but none of them seems to apply for me, while I think I have a very common setup, kind of wired only I hit the problem.

Move website from http://my.development.server/~myname/drupal to http://the.production.server works fine for anonymous visitors, by disabling clean-URI (to be enabled after move), copying database, copying files, setting permission for sites/default/files/.

However if a user logs in (be it the first user or any other user of the system), she immediately gets this message:

Access denied
You are not authorized to access this page.

The same username and password works fine on the old server. The URI user gets this message is en/user/1

The above access denied message is different from what I would get if I typed wrong password, again show its not a password problem.

After user got this error message, she can still access the other part of the website that are available for anonymous visitors, but not others. E.g. if the user who logged in is administrator, she could not access anything on admin/* where she would get the same access denied message, while these admin/* pages works fine for her on the development server.

I would appreciate any help. FYI:

1. Without luck I checked every item of checklist here : http://devbee.com/you_are_not_authorized_to_access
2. I am not getting access denied message in the case of drupal not able to access mysql database, which is a frequent topic if search for "access denied"
3. others suggested on other forum discussion that I should wait a day and see if anything changes. I waited two weeks now:)
4. many browsers have been tried: firefox 3.6, seamonkey, epiphany with webkit engine... so it is unlikely to be related to an outdated cookie or browser cache.
5. others suggested changing an IP address or computer. I did without luck. I also changed to many different LAN or wifi in many provinces of China (I had been traveling in last 2 weeks), without luck.

Comments

zhangweiwu’s picture

in case it mean something, in my users table, the user id '0' corresponds to empty username/password/mail, and usually I login as the uid 1 to manage everything in admin/*. Other users starts from 2 to 5. It is not the first time I install drupal, so I don't think I did strange things while installing.

prasannah.ganeshan’s picture

I'm having exactly the same issue for the past one week. I moved one of my drupal websites to a link "dev.website.local" to www.example.com/website.

Everything seems to be fine except that we're not allowed to login to the website by a admin user (so far i've only checked that).

Will follow this thread. I'll pass anything that goes my way.

gfuruto’s picture

Not sure if this will help, but I thought I had a similar problem to what you all are experiencing. We moved to a new server and could not access admin pages after logging in. My admin ended up commenting out the cookie_domain in the settings.php to get access back.

-g

cjback’s picture

This worked for me as well

mazze’s picture

Thank you!

Digital communication, digital commerce.

TanvirAhmad’s picture

Perfect Solution. Thanks :)

t@n