Why I can not login to magento backend using google chrome Why I can not login to magento backend using google chrome google-chrome google-chrome

Why I can not login to magento backend using google chrome


If you enabled the https for the Magento admin panel, then make sure to set "NO" for the option "Use HTTP Only" under System->configuration->web->Session and Cookie Management."

If you have access to the database then open the table "core_config_data" and search for the Path "web/cookie/cookie_httponly" and set the value to "0".

Make sure to delete the var/cache folder. Now try to login to Magento admin panel. Mostly you can now. If not post your issue in this thread.

So this "Not able to login Magento admin panel" issue mostly relates to the Magento cookies settings. So don't get worried if you encounter this tiny issue. With the list of answers in this thread you can easily sort this out in a few minutes time.


There are two solutions for this, either one will work:

  • Change the cookie lifetime configuration.Go to backend -> Sytem -> Configuration -> Web -> Session and Cookie ManagementSet cookie lifetime to 86400 and save it .

see here

  • Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

Find the code:

session_set_cookie_params($this->getCookie()->getLifetime(),$this->getCookie()->getPath(),$this->getCookie()->getDomain(),$this->getCookie()->isSecure(),$this->getCookie()->getHttponly());

or

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

and replace with

session_set_cookie_params($this->getCookie()->getLifetime(),$this->getCookie()->getPath()//$this->getCookie()->getDomain(),//$this->getCookie()->isSecure(),//$this->getCookie()->getHttponly());

or

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

After this save the file.


This so far is the best solution rather than changing the code elsewhere http://iamtheshadowonthesun.blogspot.com/2012/10/magento-cannot-login-to-admin-panel.html

Using phpMyAdmin, in your magento database, look for the core_config_data table and click it. Click the "Search" tab. Then on the "path" column set the operator to LIKE %...% and the Value to cookie and click the "Go" button to search.

After searching, set the value of web/cookie/cookie_path, web/cookie/cookie_domain, web/cookie/cookie_httponly, and web/browser_capabilities/cookies to NULL