Heroku PHP应用崩溃bash:vendor / bin / heroku-php-apache2:没有这样的文件或目录 [英] Heroku PHP app crash bash: vendor/bin/heroku-php-apache2: No such file or directory

查看:319
本文介绍了Heroku PHP应用崩溃bash:vendor / bin / heroku-php-apache2:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对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 中将路径调整为 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆