Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the GD2 extension come with PHP?

Tags:

php

gd2

gd

Does the GD2 extension come with PHP by default? If yes, since what version does it happen? Is it enabled by default?

thanks (:

like image 985
Hugo Mota Avatar asked May 09 '11 12:05

Hugo Mota


People also ask

How do I know if GD is installed in PHP?

To know this we can use phpinfo function and check GD support is available or not. Here is an image of what phpinfo function displays in a GD enabled system. The above image displayed by phpinfo function shows that GD support is enabled in the php system and ready to use.

How to enable GD PHP?

To enable GD-support configure PHP --with-gd[=DIR], where DIR is the GD base install directory. To use the recommended bundled version of the GD library, use the configure option --with-gd. GD library requires libpng and libjpeg to compile. As of PHP 7.4.

What is extension GD2?

GD2 File Summary Our most recent information indicates that GD2 files are associated with only a single known file type, the GD Library 2 Image File format, and can be viewed with the GD Library software package (developed by Boutell). Generally, these files are considered Graphic Files.


2 Answers

GD isn't compiled with PHP by default but is included with many binary distributions of PHP.

Full details/instructions are here: http://www.php.net/manual/en/image.setup.php

like image 96
James C Avatar answered Oct 21 '22 20:10

James C


On windows system, it is generally delivered but not installed. You can enable it by decommenting the section in the php.ini file.

On Linux systems (Debian & Ubuntu), on a default installation, it is activated. Rather than doing it in command line as suggests : Atticus, give it a try with a php info!

<?php 
    phpinfo();
?>

If GD is installed, you'll see it on that page. ;)

like image 25
i.am.michiel Avatar answered Oct 21 '22 18:10

i.am.michiel