推拒绝,未能检测到设置buildpack heroku / php [英] Push rejected, failed to detect set buildpack heroku/php

查看:131
本文介绍了推拒绝,未能检测到设置buildpack heroku / php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to deploy my php app from github to heroku, but it's not working. I've had experience with deploying php apps to heroku, but for some reason, I'm having trouble this time.

这就是我所做的。 p>

This is what I've done.


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

  5. 运行 git push heroku master

  1. Created an app in heroku
  2. Linked my github to my heroku app
  3. Added a remote to heroku app from my local directory
  4. Set buildpack to php
  5. Run git push heroku master

我的目录有以下文件:

My directory has the following files:

home.html
index.php
index.css

这是我的 index.php 推送被拒绝,未能检测到set buildpack heroku / php

这就是我在第5步后得到的结果:

This is what i got after step 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日志

Here is my heroku logs:

2015-11-19T00:22:31.307947+00:00 heroku[api]: Set BUILDPACK_URL config vars by email@gmail.com
2015-11-19T00:22:31.307947+00:00 heroku[api]: Release v3 created by email@gmail.com
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@gmail.com
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


推荐答案

错误。在我的git repo中,我有一个单独的文件夹,其中包含可显示网站的所有html和php文件。一旦我将它们移动到主目录中,heroku就能够检测到它是一个php应用程序。

I found out what was wrong. In my git repo, I had a separate folder that had all the html and php files that would display the website. Once I moved them out to the main directory, heroku was able to detect that it's a php app.

这篇关于推拒绝,未能检测到设置buildpack heroku / php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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