duanleiming2014 2019-02-26 17:04
浏览 106
已采纳

Heroku PHP文档的根本问题

I have a PHP app on heroku, which was deployed without issues as the following repository structure:

myapp
├── connect.php
├── elec.php
├── index.php
└── key.php

I cloned the app on a different machine, and reorganised the app as follows:

myapp
├── auth-server
│   ├── composer.json
│   ├── connect.php
│   ├── election.php
│   ├── index.php
│   └── key.php
├── poll-server
└── Procfile

with the Procfile containing the following:

web: vendor/bin/heroku-php-apache2 auth-server/

However, the deployement fails with the following message:

Enumerating objects: 35, done.
Counting objects: 100% (35/35), done.
Delta compression using up to 4 threads
Compressing objects: 100% (29/29), done.
Writing objects: 100% (34/34), 58.78 KiB | 2.35 MiB/s, done.
Total 34 (delta 7), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/php.tgz
remote:
remote:  !     ERROR: Application not supported by this buildpack!
remote:  !
remote:  !     The 'heroku/php' buildpack is set on this application, but was
remote:  !     unable to detect a PHP codebase.
remote:  !
remote:  !     A PHP app on Heroku requires a 'composer.json' at the root of
remote:  !     the directory structure, or an 'index.php' for legacy behavior.
remote:  !
remote:  !     If you are trying to deploy a PHP application, ensure that one
remote:  !     of these files is present at the top level directory.
remote:  !
remote:  !     If you are trying to deploy an application written in another
remote:  !     language, you need to change the list of buildpacks set on your
remote:  !     Heroku app using the 'heroku buildpacks' command.
remote:  !
remote:  !     For more information, refer to the following documentation:
remote:  !     https://devcenter.heroku.com/articles/buildpacks
remote:  !     https://devcenter.heroku.com/articles/php-support#activation
remote:
remote:
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to myapp.
remote:
To https://git.heroku.com/myapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myapp.git'

Since I have both, index.php and composer.json, at the document root specified by the Procfile, the error message does not seem to provide accurate information on what's missing.

Further, I checked out the commit that worked on the previous machine (which is also the current deployed version) only to find it now failing with the same message as above.

  • 写回答

1条回答 默认 最新

  • douzhu1188 2019-02-26 19:51
    关注

    https://github.com/heroku/heroku-buildpack-php/issues/326#issuecomment-467557798 The devs answered on the issue I created on the official GitHub repository.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?