Jake2315's avatar

GD Library extension not available with this PHP installation

I'm currently trying to upload images with (Laravel 5.4) intervention.

Every time I post:

GD Library extension not available with this PHP installation.

I've already tried

sudo apt-get install php7.0-gd

And checked

php -i | grep -i gd

Which is outputting

gd 
GD Support => enabled
GD headers Version => 2.2.3
GD library Version => 2.2.3
gd.jpeg_ignore_warning => 0 => 0

Cloud9 is the IDE that I'm using.

Does anybody have a clue what's wrong here?

0 likes
6 replies
SaeedPrez's avatar

@Doga your web server might run a different PHP than your CLI...

Try this route and see there if GD is enabled.

Route::get('/phpinfo', function() {
    return phpinfo();
});
3 likes
SaeedPrez's avatar
Level 50

@Doga in the phpinfo() output, is the PHP version also 7?

  • Check your php.ini, so extension=php_gd2.dll is uncommented
  • Try restarting your web server (Apache, Nginx)
2 likes
Jake2315's avatar

@SaeedPrez In my php.ini there's no line that allegeds extension=php_gd2.dll, but I think restarting the webserver worked.

1 like
Brammah's avatar

For windows, if you are using the intervention/image package, just publish php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravelRecent" , and it will dynamically load the GD Library

3 likes

Please or to participate in this conversation.