0

I changed my base URL from a local IP address to a hostname. Magento loads everything fine but when I attempt to login to the admin section the page refreshes without an error. If I type in the wrong password then the page refreshes and displays invalid credentials message.

4 Answers 4

1

It looks like this is the classic cookie error. Remove all the cookies from the previous domain or try to login with another browser/incognito mode. Also remember to change the cookie path in your DB. Check this link to achieve that.

1

I've been pulling my hair on this one a bunch of times for different reasons (Admin login loop after changing BASE URL / SECURE URL settings)

This allows me to log in everytime, fix whatever I did wrong, clear all cache, sessions, etc & undo the changes:

go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php and comment out those 3 lines (in 1.7 it's from line 89 to 91)

    $cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath()
//      'domain'   => $cookie->getConfigDomain(),
//      'secure'   => $cookie->isSecure(),
//      'httponly' => $cookie->getHttponly()
    );
1
  • This worked perfectly fine for me.
    – Ahmad Alfy
    Nov 2, 2016 at 12:56
0

Check if the cache isn't in /tmp/magento instead of [magento root]/var/cache/ Check the permissions, user and group of [magento base dir]/cache folder. If this is it, fix it and clear cache from dir var/cache.

0

Log into your database with a Mysql Client (I recommend Mysql Workbench), and issue this query:

select * from core_config_data where path like '%base_url%';

You will get 2 rows for that query (a secure (for https:// access ideally) and insecure URL), what is the value of value column ?

Your Answer

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

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