How to enable GD Library

My first basic PHP tutorial. Pretty simple tutorial on enabling the GD support extension. PHP 4.3.x and higher by default has GD support included but may not be enabled. First thing to do is to check with phpinfo(), if you don’t see GD support, then we need to enable it.

Simply open your php.ini and uncomment extension=php_gd2.dll

;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll

Next check the extension_dir and edit to your php directory.

extension_dir = C:\php\extensions\

Edit the path accordingly to where the php_gd2.dll file is found in the php directory.
Save and restart Apache. GD should now be enabled.

Post Author: lopau

2 thoughts on “How to enable GD Library

    Eric Mulovhezi

    (February 10, 2009 - 4:32 am)

    now what if my path as got a space in between the names i.e. for my localhost: “C:\Program Files\EasyPHP1-8\php\extensions\”. there is a space in between Program and Files, can it work or is the a special character that i have to replace a space with?

    lopau

    (February 10, 2009 - 4:44 am)

    there should be no problem with the space in the path.

Leave a Reply

Your email address will not be published. Required fields are marked *