magento admin panel not login using chrome but wor

2019-08-06 23:25发布

问题:

I am just a new in magento. I have installed magento on my localhost. After installing I tried to login as admin i can't be able to login using Google chrome browser but in Firefox its working fine . Any one can help me to sort out this problem? thanks in advance

回答1:

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!!!



回答2:

I would recommend editing your Magento database and removing the following lines from the core_config_data table:

web/cookie/cookie_path

web/cookie/cookie_domain

web/cookie/cookie_httponly

To find these values you can use the following SELECT command:

SELECT * FROM core_config_data WHERE path LIKE "%web/cookie%";

Thereafter,

DELETE FROM core_config_data WHERE config_id in (xx,xx,xx) where X is the config_id reference of the core_config_data table.



回答3:

I recently had the same problem and simple trick worked for me. Also this is for people who cannot access the dashboard on Google Chrome. If you can please carry on by working on Mozilla Firefox then please do so because I guess this issue is not persistent on Mozilla firefox.

So the solution for chrome is:

Goto System->Configuration->Web. Expand the Unsecure and Secure tab. Change the Base URL to http://127.0.0.1/[Your folder name] if your using localhost or change it to your Site URL through which you are accessing the frontend. I had to login twice to get the Dashboard since when I entered the details for the first time, it just refreshes and comes back to the same page as you mentioned it as looping. Please try and let me know whether it worked for you too.