December 17, 2009

Enable GD in php windows

What is required to use GD library?

* PHP 4.3.2 or Higher.


To check if GD library is there

Method 1: Use the phpinfo() Ensure that GD Support is enabled.
Method 2: Go to the command or shell prompt Execute “php –m” and ensure that “GD” module is found.

How to Configure GD?

“php_gd.dll “ is the DLL which contains all the functions. Ensure you have the DLL.

I have the DLL with me

Configuring GD is simple. Go to the “php.ini” and under the “Dynamic Extensions “ you will see “extension_dir = c:/php/includes” and “extension=php_gd.dll” Uncomment the line (i.e. remove the ; before the line)and ensure that you have the “php_gd.dll” in the specific directory.

I don’t have the DLL with me

Never mind, download the binaries from the PHP site and extract all the DLL’s to separate folder say “includes”. Copy the folder to the existing PHP directory. Follow the procedure mentioned above.

No comments:

Post a Comment