Gd library extension not available with this php installation windows 10

First of all, I am sorry if my question may be too vague. So, I will try to clarify my question as much as possible.

I am currently developing a Laravel application, and I am trying to use Intervention Image Facade. When I tried to use it to test an upload, I got the following error:-

NotSupportedException in Driver.php line 16: GD Library extension not available with this PHP installation.

So, as I would try to do, I installed the GD library using sudo apt-get install libgd3 and the php gd driver using sudo apt-get php5.6-gd. However, this did not work, and the same error keeps popping up in laravel. What have I clearly missed, and what should I follow next?

Edit 1. I used the following command to see if php actually supports gd driver : - php -i | grep -i --color gd

The following result came: -

/etc/php/5.6/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD headers Version => 2.2.3
GD library Version => 2.2.3
gd.jpeg_ignore_warning => 0 => 0
GDM_LANG => en_US
GDMSESSION => ubuntu
_SERVER["GDM_LANG"] => en_US
_SERVER["GDMSESSION"] => ubuntu

Hope this helps even more.

EDIT 2 Thanks to all who answered. I found my solution in Mayank Pandey's answer.

The GD library is required to create and manipulate images in PHP. You need to enable GD library support for working with image functions in PHP. Here we’ll show you how to install GD library in PHP on Windows server.

In order to install PHP GD support on Windows server, follow the below steps.

  • At first make sure the php_gd2.dll file is exists in extensions directory of PHP folder.
  • If php_gd2.dll file is not present in extensions directory, download it from here and insert the php_gd2.dll file to the extensions directory.
  • Open the php.ini file in a text editor and check whether the php_gd2.dll extension has already been added. (;extension=php_gd2.dll)
  • If ;extension=php_gd2.dll is exists in php.ini file, enable GD extension by uncommenting the extension=php_gd2.dll line. Uncomment can be done by deleting the leading ; from the extension.
    // change the following line from ...
    ;extension=php_gd2.dll
    
    // ... to
    extension=php_gd2.dll
    
  • To include php_gd2.dll as an extension, add the following line in php.ini.
    extension=php_gd2.dll
    
  • Restart the Windows server.

Use the phpinfo() method to check whether the GD library is installed in the PHP server. It will display information about the PHP’s configuration. Search for GD Support, you’ll see the information about the GD configuration.

(); ?>

Follow the same steps mentioned above to install the PHP GD library in XAMPP or WAMP localhost server.

Gd library extension not available with this php installation windows 10

Do you need to install PHP GD Extension? Don't worry I got you. In this post, I will share with you how to install PHP GD Extension in your windows. This extension is important if you have the functionality to create and manipulate images in PHP. Kindly follow the simple steps below.

First, check if "php_gd2.dll" is already exists in your extension web server directory. If you're using Xampp you will find it here "C:\xampp\php\ext".

Second, if "php_gd2.dll" the extension is not yet existing kindly download it here and upload it to your web server extensions directory or here "C:\xampp\php\ext".

Third, then if the above is already checked then open the "php.ini" file to your editor which is can be found in this directory "C:\xampp\php\" then search inside the "php.ini" file.

Fourth, once you found the "extension=gd2" then if you see like this ";extension=gd2" this is commented that's why GD extension is not enabled. Now we will enable this by removing the ";" (comma).

//change the following line 
;extension=gd2

//to this
extension=gd2

NOTE: If you can't found the "extension=gd2" then you must add this line under "Dynamic Extensions" inside the "php.ini" file. Just see the following file below:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename
;
; For example:
;
;   extension=mysqli
;
; When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
;
;   extension=/path/to/extension/mysqli.so
;
; Note : The syntax used in previous PHP versions ('extension=.so' and
; 'extension='php_.dll') is supported for legacy reasons and may be
; deprecated in a future PHP major version. So, when it is possible, please
; move to the new ('extension=) syntax.
;
; Notes for Windows environments :
;
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
;   extension folders as well as the separate PECL DLL download (PHP 5+).
;   Be sure to appropriately set the extension_dir directive.
;

extension=gd2

extension=bz2
extension=curl
;extension=ffi
;extension=ftp
extension=fileinfo

Fifth, now let's restart your web server.

Once your server is already restarted then let's check and confirm if the GD is already enabled to your web server. Now create a PHP file then name it as you want then add this code. Then run it. Then search GD Support and you will see the GD configuration. Then that's it you have successfully installed the GD Extension.

The above steps can be useful in WAMPP and XAMPP localhost servers.

I hope this solution may help you. Thank you for reading. Happy coding :)

Gd library extension not available with this php installation windows 10

How do I fix GD library extension not available with this PHP installation?

sudo apt-get install php5.6-gd for PHP 5.6 version. ... .
sudo apt-get install php7.0-gd. ... .
...and don't forget to reload apache2 afterwards e.g. service apache2 reload. ... .
If you're using apache server, after installing, reload sudo systemctl restart apache2 Then go back and reload your page and upload a new doc..

How do I install or enable PHP's GD extension?

To install the PHP GD follow the following steps:.
Step 1: Install XAMPP in your windows system..
Step 2: Verify if GD is already installed or not. ... .
Step 3: Locate and open php. ... .
Step 4: Find ;extension=gd..
Step 5: Remove semicolon from ;extension=gd and save the file..
Step 6: Go to php folder. ... .
Step 7: Look for php_gd..

How can I tell if GD is enabled in PHP?

Is GD turned on? You can check to see if the GD library is enabled by creating a simple phpinfo page on your web server. Open this file in Notepad, or your preferred WYSIWYG editor such as Dreamweaver. phpinfo();

How do I enable or uncomment the GD library on my PHP INI file?

dll is exists in php. ini file, enable GD extension by uncommenting the extension=php_gd2. dll line. Uncomment can be done by deleting the leading ; from the extension.