[英]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.