How to install and enable GD library in XAMPP?
19
I need to use the GD library for image processing in my PHP application, but I'm getting errors suggesting it's not installed or enabled.
How can I check if the GD library is installed in XAMPP? If it's not enabled, how do I enable it? If it's not installed, how do I install it?
1 Answer
0
## What is the use of gd library in xampp php server?
The GD library is essential for web development features such as generating and reading automated images, QR code and captcha images.
Normally, the gd library is installed and enabled on xampp's PHP server.
But if for some reason it is not enabled or not installed then before installing or enabling it check whether it is installed or not if it is installed then it is enabled or not.
## How to check if gd library is enabled on xampp's php server or not?
It is very easy to check if gd library is enabled on xampp's php server.
Create a phpinfo page on your web server for this.
1. Create a file named **phpinfo.php**
2. Write the following code in the created file:
```php
```
3. Save file
4. Open file on the web browser using localhost.
5. Usually the URL is **http://localhost/phpinfo.php**
6. If the GD library is installed and enabled on xampp's PHP server, the browser page will display the GD section with version information.
If the browser page does not display the above section, install the GD library on xampp's PHP server.
## How to install the GD library on xampp PHP server?
If the gd library is not installed on xampp's php server, install it.
1. Start **xampp**.
2. Click on **config**.
3. Then click on **PHP (php.ini)**.
4. The **PHP(php.ini)** file will open in a text editor.
5. Search for **extension=gd** in the file.
6. If you find `;extension=gd` (with semicolon), remove the semicolon to uncomment it.
7. Save the file.
8. Restart Apache server from XAMPP control panel.
9. Check again using phpinfo.php to verify GD is enabled.