Why I Can Not Login to Magento Backend Using Google Chrome

Why I can not login to magento backend using google chrome

One simple solution is to do the installation using Opera browser and use it to log in because it saves the cookies itself. It works!

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

Use another browser to set the cookie time and HTTPS settings to its correct values. You should now be able to use Chrome again.

Magento admin panel not working in chrome

I have experienced similar issues when using magento and localhost urls. Try the following steps:

  1. Visit

    chrome://net-internals/#dns

in your chrome browser and then click the "clear host cache" button.


  1. Make sure you clear your browser cookies for localhost.

  2. Clear your magento cache (just empty the var/cache folder)

magento admin panel not login using chrome but working fine in firefox

Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory and around line number 88 find the below code and comment those below lines

Change

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

To

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

And now try to login with your credentials to logged in. Hope that should works for you!!!

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

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.

Can not login Magento admin page after move to my localhost

Recently started using Magento for a project and came across this issue. I was left frustrated by the fact there are at least ten or more different workarounds suggested on the net and it took a bunch of trial and error to find one that did the job. Seemingly some workarounds work for some versions and not for others. No one explained why or how the problem occurs and the most popular solutions involve hacking the code base or using a different url, which shouldn't be necessary.

The cleanest solution I found for Community Edition 1.9.1.1 was editing two config values in the database:

update core_config_data set value = NULL where path = "web/cookie/cookie_path";
update core_config_data set value = 0 where path = "web/cookie/cookie_httponly";

The cookie path is actually NULL by default on a fresh installation but it must either be NULL or empty string.

The behavior arises because some browsers including Chrome have issues creating cookies with a localhost domain, this means that when Magento calls session_start() the session identifier cookie never gets created and as a result information can not be passed from page to page. The login procedure is actually successful but the next request doesn't know about it, hence why you get redirected back to the login screen. There are no errors because Magento doesn't account for this edge case as a possibility.

If you do not provide a domain value when creating a cookie on localhost then the browser has no problem with it. Unfortunately just setting web/cookie/cookie_path to NULL is insufficient, because Magento's configuration class resolves this as an empty string which is enough for a real domain to be set later in the code:

if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}

This method eventually uses the current HTTP host to resolve a real domain for the cookie, and the browser therefore wants nothing to do with it. However if we disable web/cookie/cookie_httponly then Magento will not perform this additional step, $cookieParams['domain'] is unset and no domain gets passed as a session parameter, thus allowing the session cookie to be created and things to function as they should.

Note that any time you modify the database configuration you must delete the contents of /var/cache/ for the changes to be reflected.

If like me you don't want to have to comment out code, or even make configuration changes, then I created an extension which overrides the getDomain() method shown above and returns null if we are on localhost, this should be somewhat more future proof and result in no collateral damage.

http://www.mediafire.com/download/q39p4k95s5tlght/LocalCookie.zip

Can't login to Magento admin panel

If everything works on the front end like you said, and you just can't log into the admin, most probably you have the original adminhtml cookie pointing to your original domain, (www.site.com) and an extra adminhtml cookie for your development domain (subdomain.site.com).

In Chrome, in Developer Tools (right-click on any page element and select Inspect Element), go to the Resources -> Cookies tab. Delete the extra cookie for your original domain. Or set your base url domain to something else, or change the port.



Related Topics



Leave a reply



Submit