Heroku PHP应用崩溃bash:vendor / bin / heroku-php-apache2:没有这样的文件或目录 [英] Heroku PHP app crash bash: vendor/bin/heroku-php-apache2: No such file or directory
问题描述
我对Heroku设置不是很好
我试图在PHP中使用一个应用程序(使用Code Igniter),但它不能很好地工作。这里是错误:
Heroku PHP应用崩溃bash:vendor / bin / heroku-php-apache2:没有这样的文件或目录
index.php位于根文件夹中。供应商目录也位于根文件夹中
composer作了他的工作
在procfile中:
web:vendor / bin / heroku-php-apache2
在我的index.php中:
require('vendor / autoload.php');
在过去我使用boot.sh方式,所以我不熟悉新方法。
我跟着本教程
https://devcenter.heroku.com/文章/开始与php#介绍
我想我错过了一些明显的东西。但我不知道是什么。
Thank you
您的 composer.json
- 将 bin-dir
设置定义为 vendor / bin
以外的其他值。运行 composer config bin-dir
来查看它是什么(或者看看你的 composer.json
的 config
部分,并在 Procfile $ c $>中将路径调整为
heroku-php-apache2
你也可以改变 Procfile
自动读取正确的值:
$ b $
web:$(作曲家配置bin-dir)/ heroku-php-apache2
https ://devcenter.heroku.com/articles/php-support#web-servers 也提到了这个 bin-dir
警告。
I'm not very good with Heroku setup
I'm trying to put online an app in PHP (with Code Igniter) but it doesn't work well. Here is the error :
Heroku PHP app crash bash: vendor/bin/heroku-php-apache2: No such file or directory
index.php is in root folder. Vendor directory also in root folder composer made his job In procfile :
web: vendor/bin/heroku-php-apache2
And in my index.php:
require('vendor/autoload.php');
In the past I used the boot.sh way, so I'm not comfortable with the new way. I followed this tutorial https://devcenter.heroku.com/articles/getting-started-with-php#introduction
I think I missed something obvious. But I don't know what. Thank you
Your composer.json
likely re-defines the bin-dir
setting to something other than vendor/bin
. Run composer config bin-dir
to see what it is (or look at your composer.json
's config
section, and adjust the path to heroku-php-apache2
in your Procfile
accordingly.
You can also just change the Procfile
to automatically read the right value:
web: $(composer config bin-dir)/heroku-php-apache2
The notes at https://devcenter.heroku.com/articles/php-support#web-servers also mention this bin-dir
caveat.
这篇关于Heroku PHP应用崩溃bash:vendor / bin / heroku-php-apache2:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!