duanao3204 2015-01-28 16:40
浏览 54
已采纳

Heroku PHP应用程序崩溃bash:vendor / bin / heroku-php-apache2:没有这样的文件或目录

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

  • 写回答

5条回答 默认 最新

  • duancan65665 2015-01-28 17:51
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器