Skip to content
Advertisement

PHP Laravel GD Library extension not available with this PHP installation But Is In PHP Ini

I know this question has been asked before but none of the other answers have given me a correct result. I’m on an AWS Linux.

I then installed Laravel and some other dependencies for my project, and it was all working great. But now I need the GD Library Extension and I can’t seem to get it to work.

I installed like this:

sudo yum install php-gd

The output I get from php -i | grep gd is this:

/etc/php.d/20-gd.ini,
gd
gd.jpeg_ignore_warning => 1 => 1

In my php.ini called by doing phpinfo(); in my php artisan tinker in my project directory, I have this:

gd

GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.11
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.5.13
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1

But when I run the Voyager admin panel which requires this extension (when I try to upload an image) I get this error:

production.ERROR: GD Library extension not available with this PHP installation.

I’ve restarted Apache and confirmed it by doing sudo systemctl status httpd.service and the status confirms the restart. Yet still nothing. Why does the phpinfo say it’s installed while the script does not?

Was I supposed to specify a version of PHP on the sudo yum install command? If so how do I do that properly and delete whatever is installed already but not working?

Advertisement

Answer

For some reason rebooting Apache was not enough.

sudo reboot (restarting the VM server itself) solved this for me.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement