Enable PHP GD2 library in Windows

Need PHP GD2 library enabled in Windows?

Follow the steps:

  1. Open the php.ini file (usually found in the PHP installation directory), search for ;extension=php_gd2.dll and uncomment it (remove the “;”). Don’t close the php.ini file yet.
  2. Search for the directive “extension_dir”. Your extensions directory is usually /ext so if it says “./” then you need to add ext/ to point PHP in the “right” direction. So the “extension_dir” directive should now point to “./ext/”. Save and close php.ini.
  3. Run php.exe. If you get an error like this: Unknown(): Unable to load dynamic library ‘…\PHP\ext\php_gd2.dll’ – The specified module could not be found. it means you don’t have the dll file in the /ext folder. Download it from the Official PHP Website Downloads page. If no error, proceed to the final step.
  4. Restart Apache. You now have GD enabled.

Post a Comment

Your email is never published nor shared. Required fields are marked *