Enabling/installing GD extension? --without-gd

0 votes
asked Feb 17, 2010 by shu

How does one enable (or perhaps I need to install) GD when my phpinfo() output in "Configure Command" says; --without-gd ?

I also have nothing in my phpinfo() output "Core" that lists "gd"

PHP Version 5.2.4 on AWS.

6 Answers

0 votes
answered Feb 17, 2010 by shane

if you are on a Debian based server (such as Ubuntu) you can run the following command:

apt-get install php5-gd

Then once it is complete run:

/etc/init.d/apache2 restart

This will restart your server and enable GD in PHP.

If you are on another type of system you will need to use something else (like yum install) or compile directly into PHP.

0 votes
answered Jan 31, 2016 by leonardo-camargo

Check if in your php.ini file has the following line:

;extension=php_gd2.dll

if exists, change it to

extension=php_gd2.dll

and restart apache

(it works on MAC)

0 votes
answered Feb 6, 2016 by slaver113

For PHP7 use:

sudo apt-get install php7.0-gd

and than restart your webserver.

0 votes
answered Sep 15, 2017 by victor

I have same problem but I would like to remind question is not how to setup gd on terminal or how to restart your server question is after all if you can not see on phpinfo file gd support what should you do? one of answer on php.net enter link description here it says you should configure your php --with-gd="your diroctory path to gd"

0 votes
answered Sep 15, 2017 by vindesh-mohariya

In my case (php 5.6, Ubuntu 14.04) the following command worked for me:

sudo apt-get install php5.6-gd

According to php version we need to change the php5.x-gd

0 votes
answered Sep 15, 2017 by alexandre-bourlier

All previous answers are correct but were not sufficient for me on ArchLinux. I also needed to edit /etc/php/php.ini and to uncomment :

;extension=gd.so

The initial ; on the line needs to be removed. After restarting Nginx via systemctl restart nginx, I was good to go.

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter

...