Hello, new user to drupal here. Love the tool so far but I have run into a problem.
I am running a windows wampserver 2 test environment on two computers (desktop and laptop)...two separate but identical configurations of wamp and drupal. I have been developing on one installation and recently tried to backup and migrate to the other.

It seems to be fine (files exported and moved to identical folder on laptop), database exported and imported completely using phpMyAdmin. No error messages and tables appear complete.

Browse to local.myproject.com and site loads and looks identical...great so far!

Then I hit this problem: I can't login. I enter my administrator account credentials and it just goes back to the login page...no error message or anything. I also cannot create a new user account, it asks for a name, email address, and password then after hitting enter, nothing. It just goes back to the login screen again.

Help! Is this a breakdown in my version (7.7)? Or a more generalized problem?

Comments

chbriceno’s picture

We're having the exact same problem. Hopefully someone more familiar with Drupal 7 can advise!

Carla

aritztg’s picture

Same here!

Any solution?

JEmbry’s picture

I had the same problem after migrating. I was hitting my /user page trying to login but couldn't. I figured if I was served /user instead of getting a 404 then mod_rewrite was on and running but it wasn't. Enabling it fixed the problem. Make sure mod_rewrite is enabled on your new server by calling <?php phpinfo(); ?> and look in the "Loaded Modules" for mod_rewrite.

Hope this helps!

bweir’s picture

mod_rewrite is not present in my phpinfo() report in the "Loaded Modules" section.
How do I enable it?

Thanks - Bweir

JEmbry’s picture

It depends on your operating system:

For Debian/Ubuntu:
http://www.lavluda.com/2007/07/15/how-to-enable-mod_rewrite-in-apache22-...

For Windows:
http://www.izitips.com/how-to/activate-mod_rewrite-module-on-apache22-wi...

If neither of those OSes, Google it. If you still can't get it send me a private message.

wasid’s picture

@JEmbry - you saved my two days of headache in 2018!

Thanks a lot :)

May Allah guide you to the right path.

BrendanP’s picture

@JEmbry Thank you. Gosh I can't believe this. I moved a site over a new Ubuntu install locally at home and could not get this to work till I enabled "mod_rewrite". Crumbs... was banging my head against the wall for ages with this. Thanks again.

drstuey’s picture

I've been banging my head for weeks now, after I couldn't login to my local dev copy after migrating from one PC to another and finally it is solved. mod_rewrite wasn't enabled on the new machine's apache. Tried so many different things but none worked. So happy now thanks.

yaach’s picture

Thank you, rewrite module was not enabled. a2enmode rewrite and then restarting the web server worked for me. Thanks!

aznation’s picture

after posting this I have been playing some more with the backup and restore/ migrate process. In order to switch files and settings between two development computers. The process worked just fine after I modified my wampserver/ development setup to be identical on both computers. So I have been working sucessfully between the two setups for past 2 weeks...yeah!

Can anyone explain what the problem was? The only difference in the two setups before was where I placed the drupal installation folder. I am still worried about what will happen once I go live with a site and need to port everything over to a hosting service.

chbriceno’s picture

If post_max_size is at 0, change it to the normal setting - 8. That fixed our problem.

thatpatguy’s picture

What happened with me was not a Mod_Rewrite or Post_Max_Size issue but rather the $cookie_domain variable set in my settings.php file. It was set to the old domain. Once I changed it to the new domain all was good again. I had totally forgotten I had set that and it never occurred to me to even look there. I hope this helps others out.

simoncowan’s picture

Yep, $cookie_domain. That was the problem for me on the live and local test site.

Many thanks thatpatguy

sch2’s picture

I was getting nowhere with a test migration until I read your post. I didn't actually forget to change it, I just had a typo in it.

sandkastle’s picture

Thank You! the $cookie_domain setting solved my issue with a migrated site.

maltehelmhold’s picture

Just forgot to change the $cookie_domain! to $cookie_domain = 'localhost:xxxx'; or
$cookie_domain = 'mysite.com'; in the settings.php!

saved me a lot of searching time!

riteshsarraf’s picture

Thank you. That was the cause of problem for me. Enabling mod_rewrite solved my problem.