GD Extension Has Been Renamed on Windows in PHP 8.0

GD Extension Has Been Renamed on Windows in PHP 8.0

GD extension allows creating and manipulate different format image files. This extension provides functions like image resizing, cropping, rotating, etc.

Since PHP 8.0, GD extension has been renamed on Windows. DLL file name has been changed from php_gd2.dll to php_gd.dll.

If you are migrating from PHP 7 to PHP 8 and just copy the php.ini file without doing any changes, you will get a warning during PHP startup. Make sure that php.ini file contains a line extension=gd instead of extension=gd2 in PHP 8.0 or newer versions.

On Linux, GD extension name is gd.so and it hasn't changed.

The 3 Comments Found

  1. Avatar
    KarwanMino Reply

    This is the best support way i ever meet, now i just deleted 2 from php_gd2.dll and its fixed.

  2. Avatar
    arnaud Reply

    Hi, I'm having issues with it using liip/imagine-bundle with symfony 5 and php 8.0.3.
    When I apply my custom liip/imagine filter on images supposed to be displayed on my website page I have an error: gd is not installed.
    In my php/ext folder i have a php_gd.dll and also a php_gd2.dll.
    In the php.ini file the extension=gd line is enabled and the extension directory is: extension_dir="C:\xampp\php\ext".

    Still I have this error and don't know how to fix it.
    Do you have any useful advice ?

    Thanks!
    Arnaud

Leave a Comment

Cancel reply

Your email address will not be published.