为什么我无法使用谷歌浏览器登录magento后端

Muk*_*esh 14 php google-chrome login magento magento-1.7

我正在使用magento社区版1.7.0.2.我无法登录到magento的后端.我知道这个问题可能是因为chrome不接受cookie.但如何解决这个请帮助.谢谢

Hai*_*ome 37

如果您为Magento管理面板启用了https,请确保在System-> configuration-> web-> Session and Cookie Management下选择" Use HTTP Only"选项设置为" NO " .

如果您有权访问数据库,则打开表" core_config_data "并搜索路径" web/cookie/cookie_httponly "并将值设置为"0".

确保删除var/cache文件夹.现在尝试登录Magento管理面板.现在大部分时间都可以.如果没有在此主题中发布您的问题.

因此,"无法登录Magento管理面板"问题主要与Magento cookie设置有关.所以,如果你遇到这个小问题,不要担心.通过此主题中的答案列表,您可以在几分钟内轻松对其进行排序.


akt*_*akt 31

有两个解决方案,其中一个可以工作:

  • 更改cookie生存期配置.转到后端 - >系统 - >配置 - > Web - >会话和Cookie管理将cookie生存期设置为86400并保存.

看这里

  • 转到magento目录中的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()
);
Run Code Online (Sandbox Code Playgroud)

要么

// session cookie params
$cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path'     => $cookie->getPath(),
    'domain'   => $cookie->getConfigDomain(),
    'secure'   => $cookie->isSecure(),
    'httponly' => $cookie->getHttponly()
);
Run Code Online (Sandbox Code Playgroud)

并替换为

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
Run Code Online (Sandbox Code Playgroud)

要么

// session cookie params
$cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path'     => $cookie->getPath()
//  'domain'   => $cookie->getConfigDomain(),
//  'secure'   => $cookie->isSecure(),
//  'httponly' => $cookie->getHttponly()
);
Run Code Online (Sandbox Code Playgroud)

在此之后保存文件.

  • 请不要在核心文件中评论上述行 (9认同)

小智 2

一种简单的解决方案是使用 Opera 浏览器进行安装并使用它来登录,因为它本身会保存 cookie。有用!