2015-11-19 21 views
8

私はgithubからherokuに自分のPHPアプリケーションをデプロイしようとしていますが、動作しません。私はherokuにphpアプリケーションを導入した経験がありますが、何らかの理由で今回は問題があります。プッシュが拒否され、検出に失敗しましたbuildpack heroku/php

これは私がやったことです。

  1. は、PHPに私のHerokuのアプリ
  2. を追加しました私のローカルディレクトリ
  3. セットbuildpackからHerokuのアプリへのリモートに私のgithubのをリンクHerokuのでアプリを作成し
  4. 実行git push heroku master

私のディレクトリには次のファイルがあります:

ここ

は私のindex.phpです:Push rejected, failed to detect set buildpack heroku/php

これは私がステップ5の後に得たものである:ここでは

Counting objects: 52, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (48/48), done. 
Writing objects: 100% (52/52), 1.12 MiB | 1.23 MiB/s, done. 
Total 52 (delta 20), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Using set buildpack heroku/php 
remote: 
remote: !  Push rejected, failed to detect set buildpack heroku/php 
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure 
remote: 
remote: Verifying deploy.... 
remote: 
remote: ! Push rejected to appp. 
remote: 
To https://git.heroku.com/appp.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/appp.git' 

heroku logs次のとおりです。

2015-11-19T00:22:31.307947+00:00 heroku[api]: Set BUILDPACK_URL config vars by [email protected] 
2015-11-19T00:22:31.307947+00:00 heroku[api]: Release v3 created by [email protected] 
2015-11-19T00:22:43.284779+00:00 heroku[slug-compiler]: Slug compilation started 
2015-11-19T00:22:43.284789+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect set buildpack heroku/php 
2015-11-19T00:22:43.284790+00:00 heroku[slug-compiler]: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure 
2015-11-19T00:27:00.648462+00:00 heroku[api]: Starting process with command `false && AUTOMATED DIAGNOSIS BEING RUN BY HEROKU SUPPORT; cat Procfile` by [email protected] 
2015-11-19T00:27:01.379352+00:00 heroku[run.2268]: Awaiting client 
2015-11-19T00:27:01.441226+00:00 heroku[run.2268]: Starting process with command `false && AUTOMATED DIAGNOSIS BEING RUN BY HEROKU SUPPORT; cat Procfile` 
2015-11-19T00:27:01.858759+00:00 heroku[run.2268]: State changed from starting to up 
2015-11-19T00:27:03.971434+00:00 heroku[run.2268]: Process exited with status 1 
2015-11-19T00:27:03.989162+00:00 heroku[run.2268]: State changed from up to complete 
2015-11-19T00:30:14.310979+00:00 heroku[slug-compiler]: Slug compilation started 
2015-11-19T00:30:14.310987+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect set buildpack heroku/php 
2015-11-19T00:30:14.310988+00:00 heroku[slug-compiler]: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure 
2015-11-19T00:31:54.735764+00:00 heroku[slug-compiler]: Slug compilation started 
2015-11-19T00:31:54.735775+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect set buildpack heroku/php 
2015-11-19T00:31:54.735776+00:00 heroku[slug-compiler]: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure 
2015-11-19T00:34:31.326372+00:00 heroku[slug-compiler]: Slug compilation started 
2015-11-19T00:34:31.326383+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect set buildpack heroku/php 
2015-11-19T00:34:31.326385+00:00 heroku[slug-compiler]: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure 
2015-11-19T00:34:37.003934+00:00 heroku[slug-compiler]: Slug compilation started 
2015-11-19T00:34:37.003944+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect set buildpack heroku/php 
2015-11-19T00:34:37.003946+00:00 heroku[slug-compiler]: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure 

答えて

0

私が間違っていたものを見つけました。私のgitリポジトリには、Webサイトを表示するすべてのhtmlとphpファイルを持つ別のフォルダがありました。メインディレクトリに移動したら、herokuはそれがPHPアプリケーションであることを検出できました。

+2

あなたは手の込んだと修正後の新しいフォルダ構造だったかについて具体的に説明してくださいでしょうか?私は助けるだろう –

13

私の場合は、composer.jsonというファイルをmy gitフォルダと同じディレクトリに置く必要がありました。また、実行しようとする前にjsonファイルをコミットに含めてください。git push heroku master

私のcomposer.jsonファイルにはこれだけが含まれているため、有効なjsonです。

{}

+0

私はcomposer.jsonを持っていない場合はどうしますか?私はそれを作成する必要がありますか?私のアプリは非常にシンプルで、ちょうど1つのindex.htmlと1つのCSSファイルです... – ihue

関連する問題