Page 1 of 1

How to use imagick with PHP 7.2?

Posted: 2017-12-26T08:19:52-07:00
by TomXampp
In PHP 7.2, the extensions definitions in the php.ini file do not require the initial "php_" nor the extension ".dll". So, for the php_imagick.dll file to be specified as an extension in the php.ini file, in theory you only need to add:

Code: Select all

extension=imagick
Not:

Code: Select all

extension=php_imagick.dll
...although, for backward compatibility, the instructions at the top of the file indicate that the older, full-name specification will still work but will be deprecated at some point.

Using either form above does not work. When using the new form (

Code: Select all

extension=imagick
) and when I start my XAMPP Apache server, I receive this error:
[23-Dec-2017 15:55:49 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'imagick' (tried: C:\xampp\php\ext\imagick (The specified module could not be found.
), C:\xampp\php\ext\php_imagick.dll (The specified procedure could not be found.
)) in Unknown on line 0
Using the older form of the extension initialization, (

Code: Select all

extension=php_imagick.dll
), the error message becomes:
[23-Dec-2017 15:55:49 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'imagick' (tried: C:\xampp\php\ext\php_imagick.dll (The specified module could not be found.
), C:\xampp\php\ext\php_php_imagick.dll.dll (The specified procedure could not be found.
)) in Unknown on line 0
I do have the file in the right location for XAMMP (C:\xampp\php\ext).

Can anyone else reproduce this error and/or provide a solution? I can't use PHP 7.2 until this is solved (imagick works in PHP 7.1).

Re: How to use imagick with PHP 7.2?

Posted: 2017-12-26T12:21:05-07:00
by Bonzo
Imagick is not written or maintained by the people who maintain Imagemagick.

I believe Imagick needs compiling with the correct version of Imagemagick and php; it also depend on what version of visual basic? it is compiled with. So you should try and find a dll for php 7.2. Sometimes you are lucky and the dll will work with a different version.

Re: How to use imagick with PHP 7.2?

Posted: 2017-12-26T12:59:26-07:00
by fmw42
Also be sure the use either IM 6 or 7, whichever is compatible with your version of Imagick and also be consistent with 32-bit or 64-bit versions all around as per your OS.