Reputation: 11649
I am running Windows Server 2003 and need to install a version of GD.
Can anyone point out some instructions or advice?
Upvotes: 32
Views: 102580
Reputation: 69
To enable GD image library on PHP 8 open your php.ini file, find your extensions section and add into it: extension=gd
[ExtensionList] extension=gd
** tks to this article: https://write.corbpie.com/how-to-enable-gd-library-with-xampp-php-8-on-windows/
Upvotes: 6
Reputation: 1379
After PHP 8.0, GD extension name changed from php_gd2.dll to php_gd.dll
extension=php_gd.dll
https://php.watch/versions/8.0/gd2-gd-windows
Upvotes: 17
Reputation: 31
Issue was resolved. I am using XAPP.
I tried to search for "extension=php_gd2.dll" file in "php.ini" file but there was no such thing there (";extension=php_gd2.dll" was also not there with a semicolon). Then I included the statement "extension=php_gd2.dll" myself in php.ini file. Also, I downloaded the the file "extension=php_gd2.dll" from https://www.dll-files.com/php_gd2.dll.html and placed it in folder "C:\xampp\php" (there is also another folder C:\xampp\php\ext where other extensions reside but anyway this method did not work). Then I restarted Apache and MySQL from xampp-control.exe. It did NOT work.
I RESET all the changes I made in the previous step.
Tried the other method:
opened "php.ini" file (at C:\xampp\php) and looked for "extension=gd". I noticed that there was a semicolon present with the searched word and it appeared as ";extension=gd". I removed semicolon. Saved the php.ini file. Stopped and restarted Apache from xampp-control.exe.
Now it works.
So what exactly was resolved? When I was selecting logo image on wordpress at Customizing ▸ Default/Basic Setting ▸ Site Identity, I was unable to crop it earlier. After following the second step, it works. Now I can crop files.
Upvotes: 3
Reputation: 151
GD wasn't working for me even though it was installed in the extension folder. My issue was with the php.ini file which was referenced to extension=php_gd2.dll instead of extension=php_gd.dll.
Upvotes: 1
Reputation: 3752
It was in my c:\xampp\php\php.ini
;extension=gd
This was commented out as you can see, removing ; and restarting apache server fixed my problem.
Upvotes: 31
Reputation: 154
In Windows download related Debug Pack on php.net download page, it's contain most useful modules. After, uncomment related extension, for example to gd2:
;extension=php_gd2.dll on php.ini
and uncomment extension_dir = "ext"
.
Upvotes: 1
Reputation: 2060
You need to edit your php.ini (found in your C:/PHP folder if you installed PHP here). Add the following line (or remove the ; before it if it exists in there):
extension=php_gd2.dll
Upvotes: 4
Reputation: 160833
Check php_gd2.dll
is in your extension directory and uncomment ;extension=php_gd2.dll
of your php.ini
.
Upvotes: 45