推送被拒绝,未能检测到 set buildpack heroku/php

2024-04-22

我正在尝试将我的 php 应用程序从 github 部署到 heroku,但它不起作用。我有将 php 应用程序部署到 heroku 的经验,但由于某种原因,这次我遇到了麻烦。

这就是我所做的。

  1. 在heroku中创建了一个应用程序
  2. 将我的 github 链接到我的 heroku 应用程序
  3. 从我的本地目录添加了一个远程到heroku应用程序
  4. 将 buildpack 设置为 php
  5. Run git push heroku master

我的目录有以下文件:

home.html
index.php
index.css

这是我的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] /cdn-cgi/l/email-protection
2015-11-19T00:22:31.307947+00:00 heroku[api]: Release v3 created by [email protected] /cdn-cgi/l/email-protection
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] /cdn-cgi/l/email-protection
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

就我而言,我需要有一个作曲家.json文件位于我的 git 文件夹所在的同一目录中。在尝试执行此操作之前,还要确保您在提交中包含了 json 文件git推送heroku大师.

我的composer.json 文件仅包含此内容,因此它是有效的json。

{ }

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

推送被拒绝,未能检测到 set buildpack heroku/php 的相关文章

随机推荐