I am using Laravel
web framework on my ubuntu 14.04
server and Nginx
web server, I have this error when I try to upload a file using Laravel
to the server. my upload directory is on the public/uploads
folder that has 777 permission.
The GD Graphics Library is for dynamically manipulating images. For Ubuntu you should install it manually:
sudo apt-get install php5-gd
sudo apt-get install php7.0-gd
sudo apt-get install php7.1-gd
sudo apt-get install php7.2-gd
sudo apt-get install php7.3-gd
sudo apt-get install php7.4-gd
sudo apt-get install php8.0-gd
sudo apt-get install php8.1-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
and finally restart your apache:
sudo service apache2 restart
window users using xampp apache server.
Go to php folder in xampp and open the php.ini and php configurations settings file, and change the line ;extension=gd2 or the line ;extension=gd to just extension=gd2
NB that php version 8 is stored as ;extension=gd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With