推送被拒绝,未能检测到 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 的相关文章

  • PHP - 如何获取主要 HTML 内容,例如 Firefox 中的阅读器模式

    在 android Firefox 应用程序和 safari iPad 中 我们只能通过 阅读器模式 阅读主要内容 阅读更多 http support mozilla org en US kb how enable reader mode
  • 如何从网站网址中隐藏 .html 扩展名

    我知道这个问题以前曾被问过 但有人知道隐藏 html 扩展名的好方法吗 我已经尝试了许多代码和许多答案https stackoverflow com https stackoverflow com 但我没有看到结果 那是我再问你一次 我有一
  • PDO PHP 连接,致命错误

    我的连接类 firstcode php class DB functions public db function construct try db new PDO mysql localhost dbname xxx charset ut
  • 多次部署后 Heroku Slug 大小

    我有一个红宝石 on Rails非常接近 slug 大小限制 300mb 的应用程序 我已经尽可能地减小了尺寸 slugignore但还没有得到我想要的结果 一时兴起 我尝试创建一个新的Heroku应用程序并向其部署相同的 git 存储库
  • 使用 PHP glob 列出 FTP 服务器上的文件不起作用

    我使用此代码来访问目录 location files pictures glob location png 我想使用 FTP 访问远程路径 location opendir ftp user password host name files
  • 使用值填充的 Symfony2 自定义字段类型

    这是先前问题的后续问题Symfony2 自定义表单类型或扩展 https stackoverflow com questions 24079288 symfony2 custom form type or extension 我正在尝试为订
  • 是否可以用 PHP 编写电子邮件解析器? [关闭]

    就目前情况而言 这个问题不太适合我们的问答形式 我们希望答案得到事实 参考资料或专业知识的支持 但这个问题可能会引发辩论 争论 民意调查或扩展讨论 如果您觉得这个问题可以改进并可能重新开放 访问帮助中心 help reopen questi
  • Facebook API sdk 4.0 - 将照片发布到 Facebook

    我正在尝试创建一个应用程序 用户可以在其中浏览照片并将其从计算机提交到 Facebook 为此 他们首先必须将照片上传到服务器 然后使用 Facebook 请求将此图像发布到 Facebook 我正在使用多部分 表单数据 这就是我到目前为止
  • 通过互联网IP地址从一台计算机访问xampp到另一台计算机

    我试图从另一台计算机访问我的 xampp 它显示为禁止错误 然后我在 google 上搜索答案 因为他们告诉在 apache 文件夹中的 httpd conf 文件中更改一些设置 如下所示 Order Deny Allow Deny fro
  • 如何关闭分支而不将其从 git 的历史记录中删除?

    我想提交并关闭其分支 而不将其从历史中删除 有了水银我会commit close branch then update转到上一个 然后继续工作 有了 git 我很困惑 没有与 Git 中关闭分支完全相同的方法 因为 Git 分支比 Merc
  • CodeIgniter:My_Lang 中的 get_instance

    我发现这个有用的国际化代码 http pastebin com SyKmPYTX http pastebin com SyKmPYTX 一切正常 除了我无法在此类中使用 CI 函数 我想从 DB 设置 languages 和 special
  • PHP 接口有属性吗?

    PHP 中的接口有属性 还是只有方法 您可以在 DocBlock 中为接口声明属性 然后 IDE 将提示接口的这些属性 PhpStorm 会这样做 但这不会强制在实现类中实际实现这些字段 例如 property string passwor
  • 自动同步两个 git 存储库

    是否可以保持同步两个 Github 存储库 远程 的特定文件夹 有两个 github 存储库 repoA 和 repoB 这两个存储库都有名为 ABC 的文件夹以及其他独特的文件夹 如果repoA的文件夹ABC中的任何文件有更新 我想自动更
  • 为什么“git描述-dirty”在描述干净结帐时添加“-dirty”后缀?

    我刚刚发现 dirty选项git describe看起来它应该做一些非常有用的事情 即在输出中附加一个后缀git describe当工作树脏时 但是在我的一些存储库上似乎并非如此 git status On branch 8 30 noth
  • 雄辩的第一个 where 子句

    我想知道 Laravel 如何实现雄辩的语法 以便可以静态调用第一个 where 子句User where User where id 23 gt where email email gt first 他们有吗public static f
  • PHP session_regenerate_id 和黑莓浏览器

    问候 我正在开发一个登录系统 并陷入了黑莓浏览器身份验证的困境 他们似乎对 PHP 的 session regenerate id 有问题 有人可以建议替代方案吗 以下是身份验证和登录脚本 UPDATE看来会话一般都不起作用 拿出 sess
  • session_start():无法解码会话对象

    我有时在使用 CodeIgniter 时遇到以下问题 错误 2019 03 05 19 57 26 gt 严重性 警告 gt session start 无法解码会话对象 会话已被销毁 system libraries Session Se
  • PHP 表单 - 带验证蜜罐

    我有以下内容 效果很好 但对垃圾邮件机器人开放 我想放入蜜罐 而不是验证码 下面的代码适用于验证姓名 电子邮件 消息 但我无法让它与蜜罐一起工作 任何人都可以查看 蜜罐 代码并告诉我如何修复它吗 我希望表单给出 success2 不允许垃圾
  • 通过 htaccess 将 PNG 解析为 PHP 仅适用于本地服务器,但不适用于网络服务器

    我用 PHP 创建了一个动态 PNG 图片 为了使用 PNG 扩展名 我创建了一个包含以下内容的 htaccess 文件 AddType application x httpd php png 在我的本地 XAMPP 服务器上 一切工作正常
  • PHP更改小数点分隔符

    在某些情况下 PHP 会在操作后更改小数点分隔符 下面是一个示例 为什么小数点分隔符变成 这是一个多语言网站 在西班牙语版本中 区域设置设置为西班牙语 es ES 小数点分隔符为 这就是为什么正在改变 解决方案是强制 LC NUMERIC

随机推荐