require_once(): Failed opening required '/var/www/config/config.php' (include_path='.:&#

Posted 300js

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了require_once(): Failed opening required '/var/www/config/config.php' (include_path='.:&#相关的知识,希望对你有一定的参考价值。

环境

docker环境

错误

[Tue Jun 18 18:43:26 2019] 127.0.0.1:53980 [500]: /index.php - require_once(): Failed opening required '/var/www/config/config.php' (include_path='.:') in /var/www/vendor/forkiss/pharest/src/Pharest/Register/Register.php on line 10

原因

composer.json

升级 google/protobuf, grpc/grpc 出现以上错误 .无法加/var/www/config/config.php配置文件 , 而真实config目录为: /var/www/app/config/config.php

"require": 
        "php": ">=7.0.0",
        "ext-phalcon": ">=3.0.0",
        "forkiss/pharest": "~0.9",
        "ramsey/uuid": "~3.6",
        "aliyuncs/oss-sdk-php": "~2.2",
        "apache/thrift": "~0.10.0",
        "overtrue/wechat": "^3.3",
        "doctrine/cache": "1.6.*",
        "google/protobuf": "v3.1.0-alpha-1",
        "grpc/grpc": "^1.3"
    ,

解决:

vim /var/www/vendor/forkiss/pharest/src/Pharest/Register/Register.php

//$config = new \Pharest\Config(require_once APP_ROOT . '/config/config.php');//原代码
   $config = new \Pharest\Config(require_once APP_ROOT . '/app/config/config.php'); //修改后的代码

以上是关于require_once(): Failed opening required '/var/www/config/config.php' (include_path='.:&#的主要内容,如果未能解决你的问题,请参考以下文章

require_once(): Failed opening required '/var/www/config/config.php' (include_path='.:&#

php使用include报错require_once(../include.php): failed to open stream: No such file or directo

OP_REQUIRES failed at conv_ops.cc:386 : Resource exhausted: OOM when allocating tensor with shape..

Failed to to start Clean up any mess left by 0dns-op解决方

如何解决hadoop文件无法浏览问题“Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error“

注意:jdk版本问题,导致hdfsweb界面,Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error