Magento登录失败



我在本地主机上安装了Magento。当我尝试登录管理员并输入正确的用户名和密码时,我再次被重定向到登录页面,其中包含 URL:

http://localhost/magento/index.php/admin/index/index/key/e88edc351f2b6e669632765634b999f1/

请注意 URL 中的两个"索引"段。我也没有收到错误。

但是,当我故意输入错误的用户名和密码时,我被重定向到同一页面(相同的URL),但出现错误:

Invalid User Name or Password.

知道出了什么问题吗?我正在使用Magento 1.8.1.0。

尝试像http://127.0.0.1/magento/一样使用您的IP运行

在此之前,更改core_config_data表中的 2 个参数值查找路径"Web/不安全/base_url"并更改上面的值http://127.0.0.1/magento/"Web/Secure/base_url"也应该如此

清除缓存和会话。

希望这个帮助

Magento 1.3及以下

版本

在您的Magento安装文件夹中查找应用程序/代码/核心/法师/核心/模型/会话/抽象/变量.php。注释掉行(见下文)80 到 83。行号可能会有所不同。您必须在行中注释逗号 (,):

$this→getCookie()→getPath(), set session cookie params session_set_cookie_params( $this→getCookie()→getLifetime(), $this→getCookie()→getPath() , $this→getCookie()→getDomain(), $this→getCookie()→isSecure(), $this→getCookie()→getHttponly() );

对于Magento 1.4及更高版本:

找到

app/code/core/mage/Core/Model/Session/Abstract/Varien.php

并查找第 86 行到 98 行

if (!$cookieParams['httponly']

) { unset($cookieParams['httponly']); if (!$cookieParams["安全"]){ unset($cookieParams['secure']); if (!$cookieParams["域"]){ unset($cookieParams['domain']); }} } if (isset($cookieParams['domain'])){ $cookieParams['域'] = $cookie→getDomain();}

有关详细信息,请参阅链接

相关内容

最新更新