[英]I can't deploy my php app to Heroku
这是我第一次接触到 Heroku(真的很神奇)。 我按照以下步骤将我的第一个应用程序部署到 heroku。
git init
git add .
git commit -m 'first commit'
heroku create abcfirstapp
git remote add origin git@heroku.com:abcfirstapp.git
git push heroku master
我得到了这样的错误
Heroku推送被拒绝,没有检测到Cedar--supported app To git@heroku.com:abcfirstapp.git [remote.rejected] master -> master (pre-receive hook denied) error: failed to push some refs to 'git@heroku. com:abcfirstapp.git'
我很确定我的 php 文件可能是写的,因为它在我的本地 xampp 服务器上运行良好
<?PHP phpinfo(); ?>
还有一个问题是:当我尝试从 heroku 中提取时使用
git pull heroku master
我有一个错误
致命:找不到远程参考主
有人可以帮我吗?
谢谢
默认的 PHP buildpack 通过在 repo 根目录中查找index.php
来检测 PHP 应用程序。 你有其中之一吗?
或者,您可以对 buildpack 进行硬编码:
heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
没有检测到雪松-支持的应用程序
PHP 不是 Heroku 上原生支持的语言,我想是在 Facebook 应用程序之外。 您需要使用第三方 Buildpack 之类的东西。
看起来文档(2015 年 4 月)建议您通过以下方式设置自定义 buildpack:
heroku buildpack:set https://github.com/heroku/heroku-buildpack-php
需要的是至少一个空的composer.json
推送这个,然后重新部署
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.