Can't login to Drupal 7 website after move

Basic Problem

I have created a Drupal 7 website on a local ubuntu server 10.04. I just moved it to my new Linode Ubuntu server also running 10.04. Everything looks good when viewing as anonymous, but I can't login. I just get a page refresh.

Speculation

I think there is something really simple with my hosts file or with permissions preventing me from loggin in. I used everything in the documentation to set things up.

Important Facts

I do not have public DNS pointing at the server. I am trying browse and login using the servers ip address. Alternatively I tried changed my local computer host file to point to the domain that I would like to use. This was all in the excellent Linode instructions.

I saw a similar post about a WP site. It mentioned a database entry that made the installation loop to a domain url that wasn't there. website_example.abc/login.php. I have never had trouble moving a Drupal website this way though.

The public directory is my superuser account public folder. I chowned them at one point to www-data to see if that was the problem. It changed nothing.

I see nothing in the mysql log or the apache2 logs that I can discern.

Questions

Could be the way cookies are setup?

Could it be default Apache settings?

Could it be .htaccess issues.

More info

I followed the directions in the following places really closely. The only thing that I added extra was APC.

http://library.linode.com/hosting-website

http://library.linode.com/securing-your-server

4 Replies

Sounds like this is set http://api.drupal.org/api/drupal/develo … e_domain/7">http://api.drupal.org/api/drupal/developer!globals.php/global/cookiedomain/7 try removing the $cookie_domain variable from your settings file.

Thank you for the input. The $cookie_domain variable was already commented out in the settings.php file. I tried removing the comment and setting it manually to the domain that I had added to my computer's host file. I also tried changing it to the ip adress of my linode. I am not even sure if you can use a ip address. In any case that did not work, so I changed it back to the original commented out version.

I also changed the linode Ubuntu server virtual host file to be the original domain that I used to build the site locally. Then I changed my local computer host file to point to the server using that domain. This did not work.

Then I tried starting from scratch. I was able to install a new Drupal 7 instance on the linode and login. This leads me to believe that the server settings are fine. I double checked the permission and ownership of the built website. That looked fine.

The difference between the two installations is that I do not get a session cookie for the migrated site. I can watch this through the firefox cookie manager list. I am baffled. The next place I look will be the database.

At this point the domain and IP would be helpful for diagnosis.

Basic mistake. I had to enable mod_rewrite

I'm still not sure why the new installation everything worked fine. I feel like I should investigate further.

sudo a2enmod rewrite

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct