简体   繁体   English

访问我的magento网站时,我收到php错误

[英]I am receiving a php error when I access my magento site

When I attempt to access my magento site or admin panel I receive this error: 当我尝试访问我的magento网站或管理面板时,出现此错误:

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/composer/autoload_real.php' (include_path='/homepages/1/d372694303/htdocs/Magento 1.8/app/code/local:/homepages/1/d372694303/htdocs/Magento 1.8/app/code/community:/homepages/1/d372694303/htdocs/Magento 1.8/app/code/core:/homepages/1/d372694303/htdocs/Magento 1.8/lib:.:/usr/lib/php5') in /homepages/1/d372694303/htdocs/Magento 1.8/app/code/local/Elite/vendor/autoload.php on line 5

All I did was disable all caching from the admin panel and now I cannot access the site. 我所做的就是从管理面板禁用所有缓存,现在我无法访问该站点。 Is there a way to re-enable caching? 有没有办法重新启用缓存? I attempted to re-enable caching via phpmyadmin with the sql command 我试图使用sql命令通过phpmyadmin重新启用缓存

UPDATE `core_cache_option` SET value=1;

This did not solve my problem. 这没有解决我的问题。

There is an error in your SQL syntax, try the following. 您的SQL语法有误,请尝试以下操作。

UPDATE `core_cache_option` SET value=1;

Should be 应该

UPDATE `core_cache_option` SET `value`='1';

This looks like an error specific to your system. 这看起来像是系统特定的错误。 Either custom development, weird stuff done m third party extensions, or both. 定制开发,在第三方扩展中完成的怪异工作,或两者兼而有之。

PHP provides you with all the information you need to debug your error. PHP为您提供调试错误所需的所有信息。

If you parse apart your error message, first there's the error 如果您解析错误消息,首先是错误

Fatal error: require_once() [function.require]: Failed opening required ' DIR /composer/autoload_real.php' 致命错误:require_once()[function.require]:无法打开所需的' DIR /composer/autoload_real.php'

As others have pointed out, the magic constant __DIR__ is being included literally in a string. 正如其他人指出的那样,魔术常量__DIR__实际上是包含在字符串中的。

Second, in parenthesis, PHP lets you know the include paths during the request 其次,在括号中,PHP使您知道请求期间的包含路径

(include_path='
/homepages/1/d372694303/htdocs/Magento 1.8/app/code/local:
/homepages/1/d372694303/htdocs/Magento 1.8/app/code/community:
/homepages/1/d372694303/htdocs/Magento 1.8/app/code/core:
/homepages/1/d372694303/htdocs/Magento 1.8/lib:.:
/usr/lib/php5') 

These look pretty standard (although personally I wouldn't include a space in your "Magento 1.8" path name, but I'm old) 这些看起来很标准(尽管就我个人而言,“ Magento 1.8”路径名中不会包含空格,但我已经老了)

Third, and finally, PHP tells you where the error happened. 第三,最后,PHP告诉您错误发生在哪里

in /homepages/1/d372694303/htdocs/Magento 1.8/app/code/local/Elite/vendor/autoload.php on line 5 在第5行的/ homepages / 1 / d372694303 / htdocs / Magento 1.8 / app / code / local / Elite / vendor / autoload.php中

So line 5 of app/code/local/Elite/vendor/autoload.php is where the error occurred. 因此, app/code/local/Elite/vendor/autoload.php是发生错误的地方。

As to why it occurred, it looks like someone is trying to use composer to install something in the Elite folder. 至于为什么发生,似乎有人试图使用作曲家在Elite文件夹中安装某些东西。 This could be how the extension/theme provided in Elite shipped, or it could be something another developer has done to the system. 这可能是Elite随附的扩展程序/主题的发布方式,也可能是另一位开发人员对该系统所做的事情。

When you disable to cache in Magento, the things Magento would normally pull from cache need to be regenerated. 当您禁用在Magento中缓存时,需要重新生成Magento通常从缓存中提取的内容。 That means more, and different, code runs. 这意味着将运行更多且不同的代码。 Turning cache back on won't fix this, and Magento first needs to cache something before it can pull it from cache. 重新启用缓存无法解决此问题,Magento首先需要缓存某些内容,然后才能将其从缓存中拉出。 My best guess as to what happened is a developer was working on something in the app/code/local/Elite folder, something that normally isn't called when the system is cached. 关于发生的事情,我最好的猜测是开发人员正在处理app/code/local/Elite文件夹中的某些内容,而在缓存系统时通常不会调用这些内容。

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

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