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

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)