Reputation: 61
I am using laravel web framework on centos 7 server and nginx web server, I installed php71w-gd and still getting this error when i want to upload a file
Intervention \ Image \ Exception \ NotSupportedException
GD Library extension not available with this PHP installation.
you may need to know this
# php -i | grep gd
/etc/php.d/gd.ini,
gd
gd.jpeg_ignore_warning => 1 => 1
Upvotes: 3
Views: 3468
Reputation: 61
I fixed it by reinstalling php71 and php-gd from "Remi's RPM repository" by running this code.
# yum --enablerepo=remi-php71 install php-gd
after that you should restart nginx and php-fpm:
# systemctl restart nginx
# systemctl restart php-fpm
Also look at How to Install PHP 7, NGINX & MySQL 5.6 on CentOS/RHEL 7.4 & 6.9 if you have any problem in installing and configuring your server for laravel.
Upvotes: 3
Reputation: 655
@Hamed Abdollahi please check follwing steps,
The GD Graphics Library is for dynamically manipulating images. For Ubuntu you should install it manually:
PHP5: sudo apt-get install php5-gd
PHP7.0: sudo apt-get install php7.0-gd
PHP7.1: sudo apt-get install php7.1-gd
PHP7.2: sudo apt-get install php7.2-gd
That's all, you can verify that GD support loaded:
php -i | grep -i gd
Output should be like this:
GD Support => enabled
GD headers Version => 2.1.1-dev
gd.jpeg_ignore_warning => 0 => 0
Upvotes: 3