简体   繁体   English

Magento无法登录管理控制台错误500

[英]Magento can't login Admin panel error 500

I have a live running website developed using magento (1.8.1.0). 我有一个使用magento(1.8.1.0)开发的实时运行网站。 The frontend is working fine but (from this morning) when I try to log in the admin panel I get the "http error 500" even if I use a wrong password or username. 前端工作正常,但是(从今天早上开始)当我尝试登录管理面板时,即使我使用了错误的密码或用户名,也会收到“ http错误500”。

Foreach login attempt the magento error log reports: Foreach登录尝试magento错误日志报告:

mod_fcgid: stderr: PHP Fatal error: Call to a member function loadByUsername() on a non-object in $MAGENTO_ROOT/httpdocs/includes/src/Mage_Admin_Model_User.php on line 408 mod_fcgid:stderr:PHP致命错误:在第408行的$ MAGENTO_ROOT / httpdocs / includes / src / Mage_Admin_Model_User.php中的非对象上调用成员函数loadByUsername()

the corresponding code in Mage_Admin_Model_User.php is: Mage_Admin_Model_User.php中的相应代码为:

406>  public function loadByUsername($username)
407>     {
408>       $this->setData($this->getResource()->loadByUsername($username));
409>       return $this;
410>     }

I have just deleted the cache and session directories but the problem remains. 我刚刚删除了缓存和会话目录,但问题仍然存在。

what could have happened ? 会发生什么? how can I fix it ? 我该如何解决?

(from this morning) (从今天早上开始)

  • Was there any update on server (hosting)? 服务器(托管)上是否有任何更新? I would try to search on official Magento site if it is a common bug (other users can face it after update too) 如果它是常见错误,我会尝试在Magento官方网站上进行搜索(其他用户也可以在更新后面对它)
  • Test copy of installation (ftp + db) on different server (hosting) in order to see if the problem persists. 测试安装在不同服务器(主机)上的副本(ftp + db),以查看问题是否仍然存在。
  • Try to Google it similar to this ( $MAGENTO_ROOT/httpdocs/includes/src/ is your site specific so Google will find nothing relevant): 尝试以类似的方式在Google上搜索它$MAGENTO_ROOT/httpdocs/includes/src/是您的特定网站,因此Google找不到任何相关信息):

loadByUsername() on a non-object in Mage_Admin_Model_User.php on line 408 第408行的Mage_Admin_Model_User.php中非对象上的loadByUsername()

Thank's all for the contribute, the problem is solved. 谢谢大家的贡献,问题得到了解决。 It was very sneaky. 真是偷偷摸摸。

I've found in the directory app/code/core/Mage/ the directory "Admin" renamed as "Admin " (Admin with 2 spaces). 我在目录app / code / core / Mage /中找到了已重命名为“ Admin” (带有2个空格的Admin)的目录“ Admin” Moreover this files were missing: app/code/core/Mage/Admin/etc/config.xml and app/code/core/Mage/Admin/Helper/Data.php . 此外,缺少以下文件: app / code / core / Mage / Admin / etc / config.xmlapp / code / core / Mage / Admin / Helper / Data.php

After renaming the directory, restoring files, deleting cache and session, the problem is solved. 重命名目录,还原文件,删除缓存和会话后,问题得以解决。 It was probably originated by a cache update in Cache Management section. 它可能是由“缓存管理”部分中的缓存更新引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM