Last Updated on 25th August 2020 at 06:47 pm
In this example you will see how to enable GD2 library for PHP in Windows operating System. The GD2 library is an image library used for image processing, such as, resize, crop, watermark etc. You can find more information on this here.
PHP 7.3.5, Windows Operating System
Enabling GD2 Library
Go through the following steps in order to enable GD2 library for PHP in Windows.
- Make sure
php_gd2.dllis present under your PHP installation’s ext directory. For example, if you have installed PHP under C drive, then your ext directory would be C:\<php installation directory>\ext.
- If the above dll file does not exist in your PHP’s ext directory then you can download it by searching in Google with the name
php_gd2.dll. Put the downloaded dll file under the PHP’s ext directory.
- Now open you php.ini file (location: C:\<php installation directory>\ php.ini) and make an entry
extension=php_gd2.dllinto this file. Make sure the entry does not exist, otherwise GD2 library already enabled for your PHP.
- Now if your HTTP server (Apache or IIS or any other server) is already running then you need to stop and start to reflect the changes.
That’s all. Thanks for reading.