How to install/enable GD in xampp windows [php 7.2]?
Asked Answered
B

8

26

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??

Buckeye answered 2/4, 2019 at 11:59 Comment(0)
E
83
  1. go to php.ini file
  2. search this ;extension=gd
  3. remove ; then restart the server
Erne answered 7/1, 2021 at 8:0 Comment(2)
Worked form me on Windows 10 64-bit and XAMPP PHP 8.1.1 64-bit.Joslin
Added extension=gd without semicolon in xampp PHP 8.1.2Serpent
G
25

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

Guelph answered 2/4, 2019 at 12:7 Comment(3)
Remember to start stop apache after uncommeting an extensionGuelph
It's already enabled. Fixed the issue by correcting the file path. If the file path is invalid it will display the error message "Your server does not support the GD function required to process this type of image." Thanks for the answer.Buckeye
Extension 'gd2' not found, but 'gd' does.Ravenna
T
12

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.

Touraco answered 1/7, 2021 at 7:35 Comment(1)
This doesn't work for me with the recent xampp version using php 8Hurty
A
5
  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
Aerobatics answered 11/12, 2021 at 21:21 Comment(0)
P
2

Also for windows user if you have multiple xampp installed check which php ini is being used by composer by using command

php --ini

if its not the one you are using u can try uninstalling the undesired one and then trying again

Pentadactyl answered 7/9, 2022 at 15:25 Comment(0)
U
1

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

extension=gd
extension=C:\xampp\php\ext\php_gd.dll
Undecided answered 21/5, 2022 at 16:12 Comment(0)
P
1
  1. open xampp
  2. in apache server click config - php.ini
  3. go to php.ini file
  4. ctrl + f to search this ;extension=gd
  5. remove ; then restart the server
Peterpeterborough answered 8/8, 2022 at 11:8 Comment(0)
P
0

What worked for me on XAMPP version 3.3.0 running PHP v 8.0.30:

  1. Started the XAMPP server.
  2. Clicked on the Admin tab of the Apache module in the XAMPP interface.
  3. Clicked to open the php.ini file.
  4. Searched for (Ctrl + F) the keyword extension=gd.
  5. Uncommented the line where the keyword extension=gd appeared, by removing the semi-colon ;at the beginning of the line.
  6. Stopped and restarted both the Apache and MySQL modules on the XAMPP server application window.

Issue was resolved thereafter!!! Continue your development work!!!

Perissodactyl answered 18/4 at 6:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.