Laravel Intervention Image GD library extension

后端 未结 5 1623
不知归路
不知归路 2021-02-08 03:11

First of all, I am sorry if my question may be too vague. So, I will try to clarify my question as much as possible.

I am currently developing a Laravel application, and

5条回答
  •  终归单人心
    2021-02-08 03:29

    After all the above failed, I upgraded to php 7.3.x from php7.2.x, using

        sudo apt install php
    

    then installed gd

        sudo apt-get install php7.3-gd
    

    to be sure, restart the apache server or xampp(as was for my case) and also restart php artisan serve.

    Using the appropriate php.ini file, ensure that "extension=php_gd2.dll" is enabled by removing the semicolon that appears before it.

    then check what you have on grep through

        php -i | grep -i --color gd
    

    it should look like this.

    /etc/php/7.3/cli/conf.d/20-gd.ini,
    gd
    GD Support => enabled
    GD headers Version => 2.2.5
    GD library Version => 2.2.5
    gd.jpeg_ignore_warning => 1 => 1
    GDM_LANG => C.UTF-8
    GDMSESSION => gnome
    XAUTHORITY => /run/user/1000/gdm/Xauthority
    $_SERVER['GDM_LANG'] => C.UTF-8
    $_SERVER['GDMSESSION'] => gnome
    $_SERVER['XAUTHORITY'] => /run/user/1000/gdm/Xauthority
    

    in the case that after this, you get an error concerning drivers on your laravel app, this answer may help solve it.Laravel 5 PDOException Could Not Find Driver

    I hope this helps you.

提交回复
热议问题