'How to install/enable GD in xampp windows [php 7.2]?

I Can't figure out how to install php-gd for PHP7.2. Is there any way to install/enable GD extension in xampp windows? I checked the php.ini file for php_gd2.dll but I can't find that line. It seems like GD is missing in PHP7.2. Any suggestions??



Solution 1:[1]

  1. go to php.ini file
  2. search this ;extension=gd
  3. remove ; then restart the server

Solution 2:[2]

Under xampp/php/php.ini look for "extension=gd2" and uncomment it, I presume this what you looking for

Solution 3:[3]

8 steps:

  1. Open xampp control panel.
  2. Start apache and mysql.
  3. Click on config option of apache.
  4. Click on php.ini and open it.
  5. Press Ctrl+F and search "extension=" or "extension=fileinfo".
  6. On the next line to "extension=fileinfo", add "extension=gd".
  7. Save the file.
  8. Stop apache and restart it.

You are done.
My PHP version is 8. if yours is 7 you may need to add extension=gd2 in php.ini file.
You can see your PHP version by searching for "localhost/dashboard" in the browser and then clicking on "PHPinfo" at the top right.

if ";extension=gd" is already there, remove the semicolon and save the file and restart Xampp.

Solution 4:[4]

  1. open XAMPP control panel
  2. click Apache config select PHP(php.ini)
  3. ctrl + F , so search for gd
  4. you should see a line like ;extension=gd
  5. just remove ; and save it
  6. stop apache and restart
  7. Your XAMPP now has GD enable

Solution 5:[5]

I had to add the absolute path to the extension as well:

extension=gd
extension=C:\xampp\php\ext\php_gd.dll

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 N69S
Solution 2 marcovie
Solution 3 zx485
Solution 4 infomasud
Solution 5 Tyler2P