“未找到错误 404"在 Magento 管理员登录页面

quot;Error 404 Not Foundquot; in Magento Admin Login Page(“未找到错误 404在 Magento 管理员登录页面)
本文介绍了“未找到错误 404"在 Magento 管理员登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

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

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,空给定,叫进来YOUR_PATHappcodecoreMageCoreModelApp.php在第 555 行并定义在YOUR_PATHappcodecoreMageCoreModelStore.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_PATHappcodecoreMageCoreModelApp.php on line 555 and defined in YOUR_PATHappcodecoreMageCoreModelStore.php on line 285

可恢复错误:参数 1 已通过到Mage_Core_Model_Store_Group::setWebsite()必须是一个实例Mage_Core_Model_Website,空给定,叫进来YOUR_PATHappcodecoreMageCoreModelApp.php在第 575 行并定义在YOUR_PATHappcodecoreMageCoreModelStoreGroup.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_PATHappcodecoreMageCoreModelApp.php on line 575 and defined in YOUR_PATHappcodecoreMageCoreModelStoreGroup.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 管理员登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)