我是Heroku的新手,我知道很多類似的問題已經在stackoverflow上詢問過,但我找不到適用於我的任何解決方案。Heroku Laravel 4.2需要Mcrypt PHP擴展
嘗試部署我laravel 4.2的應用程序時,我得到了以下問題:
remote: > php artisan clear-compiled
remote: Mcrypt PHP extension required.
remote: Script php artisan clear-compiled handling the post-install-cmd event returned with error code 1
remote: ! Push rejected, failed to compile PHP app.
我試圖用heroku run bash
命令連接到Heroku的環境,但不能得到mcrypt擴展的狀態,因爲沒有根權限授予我。
還嘗試將heroku buildpacks:set https://github.com/heroku/heroku-buildpack-php
設置爲buildpack。但沒有成功。
這是我composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/library",
"app/controllers",
"app/models",
"app/Lib.php",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
任何幫助深表感謝。
請編輯你的問題並添加你的'composer.json'。 – Chris
@ Chris,更新了composer.json的問題 – meen