“找不到错误404";在Magento管理员登录页面中 [英] "Error 404 Not Found" in Magento Admin Login Page

查看:228
本文介绍了“找不到错误404";在Magento管理员登录页面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将magento安装从一台本地计算机服务器转移到了另一台本地计算机.现在,我无法登录到管理面板.当我转到管理员登录网址时,收到以下错误消息:-

I just transfered my magento installation from one local machine server to another. Now, I cannot login to admin panel. When I go to the admin login url, I get the following error message:-

错误:找不到404"

模块的某些页面也显示此错误.

Some of my module's pages also show this error.

任何人都可以找出问题所在吗?

Can anyone please figure out the problem?

推荐答案

最后,我找到了解决问题的方法.

Finally, I found the solution to my problem.

我查看了Magento系统日志文件(var/log/system.log).在那里,我看到了确切的错误.

I looked into the Magento system log file (var/log/system.log). There I saw the exact error.

错误如下:-

可恢复的错误:参数1已通过 到Mage_Core_Model_Store :: setWebsite() 必须是 Mage_Core_Model_Website,给定null, 呼入 YOUR_PATH \ app \ code \ core \ Mage \ Core \ Model \ App.php 在第555行并在 YOUR_PATH \ app \ code \ core \ Mage \ Core \ Model \ Store.php 在第285行

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in YOUR_PATH\app\code\core\Mage\Core\Model\App.php on line 555 and defined in YOUR_PATH\app\code\core\Mage\Core\Model\Store.php on line 285

可恢复的错误:参数1已通过 到 Mage_Core_Model_Store_Group :: setWebsite() 必须是 Mage_Core_Model_Website,给定null, 呼入 YOUR_PATH \ app \ code \ core \ Mage \ Core \ Model \ App.php 在第575行并在 YOUR_PATH \ app \ code \ core \ Mage \ Core \ Model \ Store \ Group.php 在第227行

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in YOUR_PATH\app\code\core\Mage\Core\Model\App.php on line 575 and defined in YOUR_PATH\app\code\core\Mage\Core\Model\Store\Group.php on line 227

实际上,我之前有此错误.但是,像Error: 404 Not Found这样的错误显示消息对我来说是新的.

Actually, I had this error before. But, error display message like Error: 404 Not Found was new to me.

此错误的原因是,管理员的store_idwebsite_id应该设置为 0(零).但是,当您将数据库导入新服务器时,不知何故这些值未设置为0.

The reason for this error is that store_id and website_id for admin should be set to 0 (zero). But, when you import database to new server, somehow these values are not set to 0.

打开PhpMyAdmin并在数据库中运行以下查询:-

Open PhpMyAdmin and run the following query in your database:-

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

我在这里写过关于这个问题和解决方案的文章:-

I have written about this problem and solution over here:-

Magento:管理员登录页面中错误:404未找到"的解决方案

这篇关于“找不到错误404";在Magento管理员登录页面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆