Cannot login to any Magento store admin and frontend only for my system

北慕城南 提交于 2019-12-12 02:55:01

问题


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



来源:https://stackoverflow.com/questions/9555484/cannot-login-to-any-magento-store-admin-and-frontend-only-for-my-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!