duanni5726 2013-12-23 23:52
浏览 53
已采纳

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

When I attempt to access my magento site or admin panel I receive this error:

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

UPDATE `core_cache_option` SET value=1;

This did not solve my problem.

  • 写回答

2条回答 默认 最新

  • doutongfu9484 2013-12-24 03:13
    关注

    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.

    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'

    As others have pointed out, the magic constant __DIR__ is being included literally in a string.

    Second, in parenthesis, PHP lets you know the include paths during the request

    (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)

    Third, and finally, PHP tells you where the error happened.

    in /homepages/1/d372694303/htdocs/Magento 1.8/app/code/local/Elite/vendor/autoload.php on line 5

    So line 5 of app/code/local/Elite/vendor/autoload.php is where the error occurred.

    As to why it occurred, it looks like someone is trying to use composer to install something in the Elite folder. This could be how the extension/theme provided in Elite shipped, or it could be something another developer has done to the system.

    When you disable to cache in Magento, the things Magento would normally pull from cache need to be regenerated. 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. 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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 QT6颜色选择对话框显示不完整
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下