'Imagick extension installation issue xampp

I am trying to install Imagick extension on windows 10 with PHP version 8.0.3 but getting below error

PHP Warning: PHP Startup: Unable to load dynamic library 'php_imagick.dll' (tried: D:\xampp\php\ext\php_imagick.dll (The specified module could not be found), D:\xampp\php\ext\php_php_imagick.dll.dll (The specified module could not be found)) in Unknown on line 0

Windows : 10 X64 
PHP version : 8.0.3

Steps to reproduce:

  1. I have added imagick.dll file in xampp\php\ext directory
  2. Added CORE_RL_.dll and IM_MOD_RL_.dll in xampp\php folder.
  3. Added extension=php_imagick.dll in xampp\php\php.ini file
  4. Restarted xammp
  5. Getting below error on webpage enter image description here
  6. In the PHP error log below error is logged. PHP Warning: PHP Startup: Unable to load dynamic library 'php_imagick.dll'


Solution 1:[1]

First download this: https://windows.php.net/downloads/pecl/releases/imagick/3.7.0/php_imagick-3.7.0-8.0-ts-vs16-x64.zip

  1. Extract from php_imagick-….zip the php_imagick.dll file, and save it to the ext directory of your PHP installation
  2. Extract from php_imagick-….zip all the other DLL files and save them to the PHP root directory (where you have php.exe)
  3. Add this line to your php.ini file: extension=php_imagick.dll
  4. Restart the Apache/NGINX Windows service (if applicable)

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 Lewin Muzvonda