Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento admin login not working in chrome but works fine for firefox

People also ask

What is the Magento admin login URL?

Default Admin URL and Path: http://yourdomain.com/magento/admin.

How do I find my Magento admin username and password?

Visit your Magento admin backend in a browser, and click the link Forgot your password. Insert your email address, complete the CAPTCHA, and then press on the Retrieve Password button. An email will be send to your email address, containing a password reset link.


I think there is the problem with session cookie with the chrome browser. So just go through this directory /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file and comment out the line from 85 to 92 in magento (1.7.2 for my case). Like this

    // session cookie params
   /* $cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath(),
        'domain'   => $cookie->getConfigDomain(),
        'secure'   => $cookie->isSecure(),
        'httponly' => $cookie->getHttponly()
    );
  */

after that try to make login from your backend. Hopefully you can make login with chrome. This will definitely help you. If you are still facing the problem then just reply me.


try using 127.0.0.1 when you set up magento in localhost. I have also encounter same problem, that's the solution a have made and it works fine.


From System -> Configuration -> General -> Web, set Unsecure and Secure Base URL with IP Address. And try to login again.


GO to File at this location :- app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

And commenting out the following (it's lines 85 to 102);

// session cookie params
$cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path'     => $cookie->getPath()//,
    //'domain'   => $cookie->getConfigDomain(),
    //'secure'   => $cookie->isSecure(),
    //'httponly' => $cookie->getHttponly()
);

//if (!$cookieParams['httponly']) {
//    unset($cookieParams['httponly']);
//    if (!$cookieParams['secure']) {
//        unset($cookieParams['secure']);
//        if (!$cookieParams['domain']) {
//            unset($cookieParams['domain']);
//        }
//    }
//}

And use your credentials to logged in. Hope that should works for you!!!


Magento sees cookie_domain on core_config_data table when you try to login. If it is diffrent from your domain, you can not enter your admin panel, just refreshing the page, no error comes up.

Open core_config_data table from your database and search or filter the path column for web/cookie/cookie_domain and change it to null or your domain.