How to install GD on Heroku

后端 未结 3 1388
长发绾君心
长发绾君心 2021-02-14 16:10

I am running Laravel 5.3 and trying to do some image manipulation. I get this error: GD Library extension not available with this PHP installation.

I\'ve tried putting g

相关标签:
3条回答
  • 2021-02-14 17:00

    Add "gd": "*" to composer.json and perform composer update

    If that doesn't work add "ext-gd":" *" and do a composer update

    0 讨论(0)
  • 2021-02-14 17:06

    I run composer require ext-gd and git push heroku master it did work.

    I tried add "gd": "*" to composer.json and perform composer update but when push to Heroku meet error with Class 'Symfony\Component\HttpFoundation\InputBag' not found. I think it's not only update ext-gd with composer update

    0 讨论(0)
  • 2021-02-14 17:13

    In composer.json file

    "require": {
            "facade/ignition": "^2.3.6",
            "fzaninotto/faker": "^1.9.1",
            "mockery/mockery": "^1.3.1",
            "nunomaduro/collision": "^5.0",
            "phpunit/phpunit": "^9.3",
            "ext-gd": "*"
    
        },
    

    Update composer and push to origin branch

    composer update
    
    git add .
    
    git commit -m "message"
    
    git push origin <branch name>
    

    Rebuild your project at Heroku

    https://devcenter.heroku.com/articles/php-support#extensions

    0 讨论(0)
提交回复
热议问题