Cannot login to any Magento store admin and fronte

2019-09-08 06:41发布

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

4条回答
淡お忘
2楼-- · 2019-09-08 07:25

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

查看更多
倾城 Initia
3楼-- · 2019-09-08 07:41

Erase everything in var/session and try to login again.

查看更多
迷人小祖宗
4楼-- · 2019-09-08 07:42

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.

查看更多
太酷不给撩
5楼-- · 2019-09-08 07:43

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.

查看更多
登录 后发表回答