2

I'm having trouble using the library. When I try to upload an image using laravel 5.4, I get a NotSupportedException

NotSupportedException in Driver.php line 16: GD Library extension not available with this PHP installation.

even though GD is definitely installed.

$ php -i | grep -i --color gd
/etc/php/7.0/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD headers Version => 2.1.1
GD library Version => 2.1.1
gd.jpeg_ignore_warning => 0 => 0
GDM_XSERVER_LOCATION => local
GDMSESSION => cinnamon
$_SERVER['GDM_XSERVER_LOCATION'] => local
$_SERVER['GDMSESSION'] => cinnamon

I tried apt-get install --reinstall php7.0-gd && service apache2 restart but no success.then i tried to enable the library GD2 from php.ini file remove semicolon from ;extension=php_gd2.dll again i restart apache2 but still no success. please help me.any help would be appreciated.

Shanu k k
  • 1,235
  • 2
  • 18
  • 43

3 Answers3

3

I had this problem too. It's happened because i updated my php on Digital Ocean server.

To solve this problem a ran the follow comand in my console. sudo apt-get install php5-gd

I belive that this code can be use for php7 too. Follow the code. sudo apt-get install php7.0-gd

0

having the same problem here in my application.

What i did installed php7.1. In my case used PPA

sudo add-apt-repository ppa:ondrej/php sudo apt-get update (optional-I didnt) sudo apt-get remove php7.0 sudo apt-get install php7.1

Restarted the apache server

Also tried this help using this providers on the "image" Alias that they suggest. It totally crashed my application. Did the steps back and no it doesnt five me the error anymore.

Im trying to run Laravel with voyager. Had some problems on the installation and making my server work had to install ubuntu Lamp and configure it exatcly to work with Laravel composer and all those shi%*ts need to make this work. All that simple propaganda bullshit. Hehehe

But anyways, if you have some idea on how to make it work it would be great. 2 days researching already on the sollutions and not being able to solve it, but Laravel and Voyager are working, they just dont upload the photos.

0

I was getting this issue too. Ubuntu; apt-get install libpng-dev Centos; yum install libpng-devel This has been resolved with downloads.

Zendem
  • 490
  • 5
  • 8