Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 流明->;第54行错误-require():无法打开required_Php_Heroku_Lumen_Dingo Api_Lumen 5.2 - Fatal编程技术网

Php 流明->;第54行错误-require():无法打开required

Php 流明->;第54行错误-require():无法打开required,php,heroku,lumen,dingo-api,lumen-5.2,Php,Heroku,Lumen,Dingo Api,Lumen 5.2,我安装了Lumen作为Heroku应用程序的新副本。我还在其中实现了Package Dingo:但当我尝试加载所有内容时,服务器返回以下错误: 2016-02-14T11:07:45.657820+00:00 app[web.1]: [14-Feb-2016 11:07:45 UTC] PHP Warning: require(/app/vendor/dingo/api/src/helpers.php): failed to open stream: No such file or direc

我安装了Lumen作为Heroku应用程序的新副本。我还在其中实现了Package Dingo:但当我尝试加载所有内容时,服务器返回以下错误:

2016-02-14T11:07:45.657820+00:00 app[web.1]: [14-Feb-2016 11:07:45 UTC] PHP Warning:  require(/app/vendor/dingo/api/src/helpers.php): failed to open stream: No such file or directory in /app/vendor/composer/autoload_real.php on line 54
2016-02-14T11:07:45.657998+00:00 app[web.1]: [14-Feb-2016 11:07:45 UTC] PHP Fatal error:  require(): Failed opening required '/app/vendor/dingo/api/src/helpers.php' (include_path='.:/app/.heroku/php/lib
/php') in /app/vendor/composer/autoload_real.php on line 54
我试图删除供应商文件夹等,并重新安装,但结果是一样的

编辑:My composer.json是:

{
    "name": "laravel/lumen",
    "description": "The Laravel Lumen Framework.",
    "keywords": ["framework", "laravel", "lumen"],
    "license": "MIT",
    "type": "project",
    "minimum-stability": "dev",
    "require": {
        "php": ">=5.5.9",
        "laravel/lumen-framework": "5.2.*",
        "vlucas/phpdotenv": "~2.2",
        "dingo/api": "1.0.x@dev"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "phpunit/phpunit": "~4.0",
        "dingo/api": "1.0.x@dev"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/",
            "database/"
        ]
    }
}

编辑2:我现在试着在我的本地机器和流明与野狗工作正常,所以它的东西与Heroku叹息。如何在Heroku日志中查看Lumen日志?

我认为您没有在Heroku应用程序中添加配置。要使您的Heroku应用程序获取所有作曲家要求,您可以在Lumen应用程序的根目录上运行以下命令:

heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
再次进行更改,然后将更改推送到heroku存储库,例如:

git push heroku master
编辑 为了实现这一点,我有自己的方法将Lumen应用程序部署到Heroku

lumen new my-app
cd my-app
# Here you can change your composer.json dependencies
composer require dingo/api
制作你的程序文件

vim Procfile

# Content of Procfile
web: vendor/bin/heroku-php-apache2 public
初始化回购

git init
git add -A .
git commit -m "[INIT] Initial commit."
创建Heroku应用程序:

heroku create
heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
git push heroku master

访问你的heroku应用程序。

你介意在这里共享你的
composer.json
文件吗?你不需要配置:addNope,同样的错误:(.我尝试了一个新的heroku应用程序,但没什么要做的。我现在在我的本地机器上尝试了,Lumen with Dingo工作正常,所以它与heroku Sign有关。你知道如何在heroku日志中查看Lumen日志吗?Krisan我接受你的答案,因为我看到如果我重新安装,现在一切都正常了。问题是.env,我没有确定现在是在吉托奥