I am not able to login to any magento store (even the demo magento store hosted on magento website). It was working fine a few days ago but now I am not able to login and my work is pending. I even tried to clear my cache bt nothing happend. Can you all help ??
问题:
回答1:
Erase everything in var/session
and try to login again.
回答2:
What Browser are you using? When I tried to log in with Chrome, it didn't work. Then I tried logging in on Opera and it worked.
回答3:
If the following is true
even the demo magento store hosted on magento website
then it means the problem is localized to your computer. That said, if this bit is accurate
I dont see any error
then it means your computer and/or web browser can't set any cookies. Magento (like 99% of modern web applications) uses a cookie based session implementation, and Magento relies on sessions to surface error messages to end users. Check your browsers security settings, or switch to a different browser. If that doesn't work you'll need to figure out why your computer can't set cookies.
回答4:
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()
);
and replace with
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
After this save the file. and Clear you all cache file from var->cache And try to login into the admin.
I think it will work now. thanks