Open In App

How to Install PHP GD in Windows?

Improve
Improve
Like Article
Like
Save
Share
Report

GD is an open-source code library that is required to create and manipulate images in PHP. It is used for creating PNG, JPEG, and GIF images. It is commonly used to create charts, graphics, thumbnails, etc, and website development is the most common application of GD. It was originally developed by Thomas Boutell and is now maintained by Pierre-A. Joye under the umbrella of PHP.net. The GD library support should be enabled for working with image functions in PHP. In this article we will learn how to install PHP GD in windows:

Installing PHP GD in Windows

To install the PHP GD follow the following steps:

Step 1: Install XAMPP in your windows system.

Step 2: Verify if GD is already installed or not. So to verify GD we need to follow the following steps:

  • Open XAMPP and click on the start button in front of Apache and MySQL to start php server, and go to the admin.

Open-XAMPP

  • A web page will open. Go to the ‘PHPInfo’ option on the top of the page.

 Go-to-the-PHPInfo-option

  • A PHPInfo dashboard will open up. 

PHPInfo-dashboard

  • Scroll down the page and search for ‘gd’. If present, GD is already installed.

Searching-for-gd.

If ‘gd’ is not present on the phpinfo page, you can follow the next to install GD.

Step 3: Locate and open php.ini in your editor.

Open-php.ini-in-your-editor

Step 4: Find ;extension=gd.

Find-;extension=gd

Step 5: Remove semicolon from ;extension=gd and save the file.

Step 6: Go to php folder. It is usually present in C:\xampp.

Go-to-php-folder

Step 7: Look for php_gd.dll in the ext folder.

Look-for-php_gd.dll

Step 8: Copy php_gd.dll and paste it into the following folder.

C:\Windows\System32

Copy-php_gd.dll Paste-php_gd.dll

Step 9: Restart the XAMPP server. Now use the phpinfo() method as mentioned in step 2 to check whether the GD library is installed in the PHP server. It will show information about the PHP’s configuration.

Restart-XAMPP-and-verify-gd


Last Updated : 30 Jan, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads