3

I wrote a quick script to pull down a live drupal database on to a machine on a local network, and that works fine.

I also made a copy of the actual Drupal instance on my own machine.

I edited settings.php to use the db on the network, and everything appears to be working correctly when I run the site from localhost, except I can't log in.

At first I thought I should just change the password directly using MySQL, but that didn't work. Then I tried running update.php, which also didn't work.

I'm stuck, why won't it accept the username/password? I have double checked that I'm using the correct login credentials on the live site, and it works fine.

Edit: The site was duplicated from a Linux server onto a Windows 7 machine, if that makes any difference.

1 Answer 1

3

First check whether $cookie_domain is set to localhost or not?

If it is set as the URL of the live site then it might not work. I faced this issue previously.

Other cause might be clean urls. You can check whether clean URL is enabled in your localhost or not.

You can check whether mod_rewrite is on or not here. If clean url is causing problem then you can disable from your database. If you want to disable clean url goto your database find variables table, find clean_url variable and set it to 0.

7
  • That line is commented out on both the live server and my local machine. I tried changing it to localhost to see if it helped any, but the problem persists. Commented Dec 3, 2012 at 4:45
  • checked clean url settings ? Commented Dec 3, 2012 at 4:52
  • Are you suggesting I turn it off? How would I do that if I can't log in? Commented Dec 3, 2012 at 4:57
  • first check if mode_rewrite is on in your localhost ? It enables clean urls. If you want to disable goto your database find variables table, find clean_url variable and make it to 0 Commented Dec 3, 2012 at 5:14
  • 2
    I had the same problem, disabling clean URLS fixed it. I used drush vset clean_url 0 --yes though
    – Ephraim
    Commented Jul 18, 2013 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.