Enabling/installing GD extension? --without-gd

05/22/2020 04:00:02

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.

Answer #1 (65 Votes)

02/17/2010 23:51:31

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.

65

Answer #2 (42 Votes)

05/06/2016 17:41:44

For PHP7.0 use (php7.1-gd, php7.2-gd and php7.3-gd are also available):

sudo apt-get install php7.0-gd

and than restart your webserver.

42
2
Hack Hex uses Stack Exchance API by the Stack Exchange Inc. to scrape questions/answers under Creative Commons license.