- 通过其它浏览器登录后台,修改cookie时间设置,位于Sytem -> Configuration -> Web,找到右侧的 Session Cookie Management,修改Cookie Lifetime“3600”为“86400”并保存。
- 如果第一步完成还不能登录,需要修改php代码,位于app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
社区版找到代码:
session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath(), $this->getCookie()->getDomain(), $this->getCookie()->isSecure(), $this->getCookie()->getHttponly() );
修改为:
session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath() //$this->getCookie()->getDomain(), //$this->getCookie()->isSecure(), //$this->getCookie()->getHttponly() );
企业版找到代码:
$cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), 'domain' => $cookie->getConfigDomain(), 'secure' => $cookie->isSecure(), 'httponly' => $cookie->getHttponly() );
修改为:
$cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), // 'domain' => $cookie->getConfigDomain(), // 'secure' => $cookie->isSecure(), // 'httponly' => $cookie->getHttponly() );
保存刷新网页,Chrome可以登录了。