Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imagick fails in PHP 7.2; php.ini problem? #224

Closed
tmb-github opened this issue Dec 29, 2017 · 67 comments

Comments

@tmb-github
Copy link

commented Dec 29, 2017

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:

extension=imagick

Not:

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 (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, (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).

@narian

This comment has been minimized.

Copy link

commented Jan 12, 2018

Exactly same thing happening

@Danack

This comment has been minimized.

Copy link
Collaborator

commented Jan 12, 2018

It's telling you which files it's trying to load:

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.)

So it's trying the wrong file first and then allegedly the correct file.

I do have the file in the right location for XAMMP (C:\xampp\php\ext).

With the older form it trying:

tried:
C:\xampp\php\ext\php_imagick.dll (The specified module could not be found.),
C:\xampp\php\ext\php_php_imagick.dll.dll

It's trying the correct filename first, and then the wrong file name.

I'm pretty sure this will either be a permissions issue, or some other issue local to your machine, rather than something caused by the change in dll loading.

@tmb-github

This comment has been minimized.

Copy link
Author

commented Jan 12, 2018

No, I've used php_imagick.dll in every version of PHP in XAMPP for Windows since PHP 5.6, and it's worked consistently. I've never had this problem before. It worked on PHP 7.1.X without any issue. There are no permission conflicts or restrictions.

To prove this, I performed a little test:

One of the standard PHP extensions is php_bz2.dll. In my PHP.INI file, it's referenced like this:

extension=bz2

There are no error messages in the PHP error log file for it. So I changed the PHP.INI line to this:

extension=bz2XXX

...and put the php_imagick.dll declaration below it, like this:

extension=bz2XXX
extension=imagick

The result is the same error message as for imagick...here's the log file:

[12-Jan-2018 14:48:12 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'bz2XXX' (tried: C:\xampp\php\ext\bz2XXX (The specified module could not be found.
), C:\xampp\php\ext\php_bz2XXX.dll (The specified module could not be found.
)) in Unknown on line 0

[12-Jan-2018 14:48:12 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

Then I removed the "XXX" from the end of the bz2 extension declaration in the PHP.INI file, like this:

extension=bz2
extension=imagick

...and the log file only shows that imagick cannot be loaded; php_bz2.dll is loaded just fine:

[12-Jan-2018 14:52:00 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

Both php_bz2.dll and php_imagick.dll are in the very same folder.

So...what's going on? Something's wrong with php_imagick.dll and the PHP 7.2.X distributions (the problem exists for 7.2.0 and 7.2.1).

(Also notice that the user "narian" above has experienced the same problem.)

@narian

This comment has been minimized.

Copy link

commented Jan 15, 2018

@Danack Can your provide versions of ImageMagick and php_imagick that works with PHP7.2 on Windows? Because I think, it's only a Windows (or latest xampp) issue, I've tried to run imagick on Debian 9 on PHP7.2 and it works perfectly. Thanks!

@mvorisek

This comment has been minimized.

Copy link

commented Jan 24, 2018

I confirm this issue on Windows with current releases with PHP 7.2.0+

@Simbiat

This comment has been minimized.

Copy link

commented Jan 30, 2018

Confirm the issue as well. And I wanted to move to it from GD =(

@odysseuscm

This comment has been minimized.

Copy link

commented Feb 1, 2018

I also confirm this issue on Windows with PHP 7.2.x

Update: got it to work with this snapshot http://windows.php.net/downloads/pecl/snaps/imagick/3.4.3/
using only the php_imagick.dll from the archive and Imagick 7.0.7-22

@Simbiat

This comment has been minimized.

Copy link

commented Feb 1, 2018

Strange, I tried that as well, but did not work for me. I am now using 7.2.2 from https://www.apachelounge.com/viewtopic.php?t=6359 and what fixed this for me is using ImageMagick ImageMagick 6.9.9-30 Q16 x64

@mvorisek

This comment has been minimized.

Copy link

commented Feb 1, 2018

I confirm that the snapshot version for PHP 7.2 is working. When should we expect an official stable release?

@weltling

This comment has been minimized.

Copy link
Contributor

commented Feb 1, 2018

Hi,

the snapshot as linked is #219 requires ImageMagick 7.x as provided under http://windows.php.net/downloads/pecl/deps/ . It might be ok with a subsequent ImageMagick 7.x series, though tested and linked with the exact 7.0.7-11 as under the link. Note also, I've no idea how the official ImageMagick releases are built. The compiler has to match, thus for PHP 7.2 it's vc15. Please also use the official windows.php.net binaries for the tests.

For PHP 7.2, the intention was to use ImageMagick 7 having improvements and better security, for the imagick builds targeting lower PHP version, ImageMagick 6 still supporting security but being legacy as provided in the deps link has to be used. Be sure the corresponding DLLs are preceding any others on the %PATH%.

To mention, the bug https://bugs.php.net/bug.php?id=75890 has nothing to do with imagick, but is a codepage issue.

Thanks.

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Feb 2, 2018

Note also, I've no idea how the official ImageMagick releases are built. The compiler has to match, thus for PHP 7.2 it's vc15.

The official ImageMagick 6.x and 7.x releases have DLL's that call MSVCR120.dll, so they are all built with VC12. Ergo, the compilers do not match with any PHP version. You are lucky if it works, but don't be surprised if you get issues when you are mixing VC runtimes.

If anybody really wants to build php_imagick.dll for PHP 7.2 with ImageMagick 7.x, the following is needed:

  1. Build your own ImageMagick binaries with VC15. Ref: http://imagemagick.org/script/install-source.php
  2. Apply PR #219
  3. Build php_imagick.dll with VC15. Ref: https://github.com/Microsoft/php-sdk-binary-tools
@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Feb 2, 2018

The official ImageMagick releases are apparently built using Appveyor. See https://github.com/ImageMagick/ImageMagick-Windows/blob/master/appveyor.yml which confirms that they are using Visual Studio 2013 aka VC12.

@weltling

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2018

Thanks for checking, @Jan-E. Ditto.

Thanks.

@Code4Dopes

This comment has been minimized.

Copy link

commented Feb 17, 2018

Throwing my confirmation into the ring:

Apache 2.4,29/PHP7.2.2 on a Win7 machine (VC14 ThreadSafe).

php_imagick-3.4.3-7.1-ts-vc14-x64 --> No Joy
php_imagick-3.4.3-7.2-ts-vc15-x64 --> SheBang! :o)

I dunno if the vc15 is 100% accurate but I do NOT have
the vc15 redistributable installed (only vc14/vs2015). Also.
I got phpinfo-imagick to confirm working and then used a few
web pages we have, but did not check every nook & cranny.

Thank you odysseuscm!

@boan-jfm

This comment has been minimized.

Copy link

commented Feb 19, 2018

Where did you find php_imagick-3.4.3-7.2-ts-vc15-x64?

It's not in the list on this date:
https://pecl.php.net/package/imagick
(https://pecl.php.net/package/imagick/3.4.3/windows)

@odysseuscm

This comment has been minimized.

Copy link

commented Feb 19, 2018

@boan2010 #224 (comment)

@chfabbro

This comment has been minimized.

Copy link

commented Feb 22, 2018

For those of you like me who have never installed ImageMagick on Windows with PHP, let alone for PHP 7.2, I found this article very useful:
Install the ImageMagick PHP extension in Windows

The table here only goes up to PHP 7.1, so I also confirm that using these builds worked for me on PHP 7.2.2/Windows 10 (thread-safe version):

  • ImageMagick-7.0.7-11-vc15-x64.zip
  • php_imagick-3.4.3-7.2-ts-vc15-x64.zip

The workflow seems really clunky to me, but I did exactly as instructed:

  • Extract from php_imagick-….zip to the ext directory the php_imagick.dll file of your PHP installation
  • Extract from ImageMagick-….zip to the root PHP directory (where php.exe resides) the DLL files that start with (and there are a TON):
    CORE_RL_
    IM_MOD_RL_
  • Add this line to your php.ini file
    extension=imagick

And then to run a simple test (should output a 1):
php -r "print(class_exists('imagick'));"

If anyone knows a more elegant installation solution, please let me know 😸

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Feb 22, 2018

Newer ImageMagick-6.9 binaries can be found here:
https://ci.appveyor.com/project/Jan-E/imagemagick-windows/build/ImageMagick-ImageMagick-Windows-6-VS2017.62
Check the artefacts of each job to download the binaries.
@weltling The VC14 artefacts are similar like the ones at http://windows.php.net/downloads/pecl/deps/
Maybe it is time to use Appveyor to build the deps.

For the others: all my PHP builds at https://www.apachelounge.com/viewtopic.php?t=6359 are built with ImageMagick 6.9.9-35 Q16 x64 2018-02-02

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Feb 22, 2018

@weltling The VC14 artefacts are similar like the ones at http://windows.php.net/downloads/pecl/deps/

@weltling I changed the artefact filenames into names like ImageMagick-6.9.9-35-vc15-x86.zip and added the LICENSE:
https://ci.appveyor.com/project/Jan-E/imagemagick-windows/build/ImageMagick-ImageMagick-Windows-6-VS2017.106

There is a huge ffmpeg.exe in the bin directory, which makes the zipfile bigger than strictly necessary.

@tmb-github

This comment has been minimized.

Copy link
Author

commented Mar 14, 2018

Following the tips provided earlier in the thread, I succeeded in getting imagick to load in PHP 7.2 on my Windows XAMPP when I went here:

https://windows.php.net/downloads/pecl/snaps/imagick/3.4.3/

...and downloaded & installed this x86 "snapshot" file set:

11/23/2017 4:51 PM 9072708 php_imagick-3.4.3-7.2-ts-vc15-x86.zip

...on top of the current 3.4.3 set at https://pecl.php.net/package/imagick (thus, overwriting some of its files).

I hope whoever is maintaining the pecl repos will update the DLLs accordingly. Thanks for everyone who posted and help solve this problem for me. I hope it will help others solve similar problems.

@Zigito

This comment has been minimized.

Copy link

commented Apr 7, 2018

After 3 hours of installing, un-installing and re-installing I was finally able to make it work. Basically, it's important to check your phpinfo() for your architecture and compiler versions: mine was x86 and MSVC15.

Based on this you want to head to imagemagick and download the appropriate executable
ImageMagick-7.0.7-28-Q16-x86-dll.exe

After installing run "magick -version" in the command prompt to verify installation. You should see version information.

Then head here and download php_imagick-3.4.3-7.2-ts-vc15-x86.zip . Unzip and copy the php_imagick.dll to the path c:\xampp\php\ext

Edit php.ini and add the following line under Dynamic Extensions where the other extensions are loaded
extension=php_imagick.dll

Head here and download ImageMagick-7.0.7-11-vc15-x86.zip . Unzip and copy all files with prefixes CORE_* and IM_MOD_* , and add them to c:\xampp\apache\bin. Also add c:\xampp\apache\bin to your .

You will need to add the bin directory of Apache (C:\xampp\apache\bin) to the PATH environment variable of Windows.

@fridzema

This comment has been minimized.

Copy link

commented Apr 10, 2018

Anyone dealing with this problem on osx?
I am running 10.13.3 with php 7.2.4 and can't get it to work anymore :(

@mlocati

This comment has been minimized.

Copy link

commented Apr 10, 2018

The table here only goes up to PHP 7.1

I updated my imagick install instructions: it now includes instructions about how to install ImageMagick on Windows with PHP 7.2

@mlocati

This comment has been minimized.

Copy link

commented Apr 10, 2018

If anyone knows a more elegant installation solution, please let me know

@chfabbro If you don't want all those DLL files in your PHP directory, you can have them in any directory in your PATH (from my article: "or to a directory present in your PATH environment variable")

@chfabbro

This comment has been minimized.

Copy link

commented Apr 10, 2018

@mlocati Your page is very helpful, thank you! I can try your suggestion of placing the files in a location accessible to the Windows PATH.

@mlocati

This comment has been minimized.

Copy link

commented Apr 22, 2018

I just released a PowerShell module that makes very easy to setup the imagick PHP extension (well, every PHP extension 😉): https://github.com/mlocati/powershell-phpmanager

@kavin-90

This comment has been minimized.

Copy link

commented Apr 26, 2018

Thanks @odysseuscm it works \o/

@patrickbussmann

This comment has been minimized.

Copy link

commented Jun 4, 2018

@mlocati solution is as cool as possible 🎉
Now upgrades are very quick and easy and installing extensions, too.
Thank you very much.

@LG0012

This comment has been minimized.

Copy link

commented Jun 20, 2018

Still not working: http://prntscr.com/jx6ara

PHP: 7.1.16
TS: Enabled
x86

@mlocati

This comment has been minimized.

Copy link

commented Jun 20, 2018

@LG0012 I just tried to install imagick both on PHP 7.1 and 7.2 (thread-safe, x86), without any problems:

PS C:\test> Install-Php -Version 7.2 -Architecture x86 -ThreadSafe $true -Path C:\test\7.2 -TimeZone Europe/Rome -InitialPhpIni Development
PS C:\test> Install-PhpExtension -Extension imagick -MinimumStability snapshot -Path C:\test\7.2
PS C:\test> C:\test\7.2\php.exe -r '$image = new Imagick(); $image->newImage(1, 1, new ImagickPixel(\"#ffffff\")); $image->setImageFormat(\"png\"); $pngData = $image->getImagesBlob(); echo strpos($pngData, \"\x89PNG\r\n\x1a\n\") === 0 ? \"Ok\" : \"Failed\";'
Ok
PS C:\test> Install-Php -Version 7.1 -Architecture x86 -ThreadSafe $true -Path C:\test\7.1 -TimeZone Europe/Rome -InitialPhpIni Development
PS C:\test> Install-PhpExtension -Extension imagick -Path C:\test\7.1
PS C:\test> C:\test\7.1\php.exe -r '$image = new Imagick(); $image->newImage(1, 1, new ImagickPixel(\"#ffffff\")); $image->setImageFormat(\"png\"); $pngData = $image->getImagesBlob(); echo strpos($pngData, \"\x89PNG\r\n\x1a\n\") === 0 ? \"Ok\" : \"Failed\";'
Ok
@mlocati

This comment has been minimized.

Copy link

commented Jun 20, 2018

@LG0012 try following my imagick install instructions (or use my PhpManager powershell module - like I did in the above examples of mine).

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2018

@LG0012

Regarding the guides, everybody is saying that - from ImageMagick zip folder you only have to copy all core_rl and im_mod_rl files into apache/bin folder.

Chances are high that PHP cannot find the dll's in the apache/bin folder. A better place is the php folder.

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2018

@mlocati

There are more dll used by the imagick extension

I am very well aware of that, because I am building ImageMagick 6 on AppVeyor myself for Visual Studio 2015 and 2017: https://github.com/Jan-E/ImageMagick-Windows/branches

ImageMagick is smart enough to look for and find the IM_*.dll's in C:\Program Files\ImageMagick\modules\coders (x64) or C:\Program Files (x86)\ImageMagick\modules\coders (x86), even if those folders are not in your path. So the IM_*.dll files do not have to be in the PHP folder if you have ImageMagick x86 and x64 installed on your system.

@mlocati

This comment has been minimized.

Copy link

commented Jul 7, 2018

With https://github.com/mlocati/powershell-phpmanager you can do everything with just this powershell command:

Install-PhpExtension imagick -MinimumStability snapshot
@tmb-github

This comment has been minimized.

Copy link
Author

commented Nov 14, 2018

This thread has been inactive for some time, however...

The Imagick extension recently ceased loading on my copy of XAMPP, yet I had not changed anything in my XAMPP setup, and the error messages were exactly the same as the ones I originally had had when I started this thread. Eventually I discovered the problem: I had deleted the Visual C++ Redistributable for Visual Studio 2015 from my system since the last time I had used Imagick in a PHP project. Reinstalling it fixed the problem. So, at least in my case, having the VC redistributable installed is essential to the solution.

@abinhho

This comment has been minimized.

Copy link

commented Dec 5, 2018

I got same thing,
When I check phpinfo() in browser, Imagick shown bit in terminal, I just run php -v and got error

This is in browser:

imagick module | enabled
-- | --
imagick module version | 3.4.3
imagick classes | Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version | ImageMagick 6.9.3-7 Q16 x86 2016-03-27 http://www.imagemagick.org
Imagick using ImageMagick library version | ImageMagick 6.9.3-7 Q16 x86 2016-03-27 http://www.imagemagick.org
ImageMagick copyright | Copyright (C) 1999-2015 ImageMagick Studio LLC
ImageMagick release date | 2016-03-27
ImageMagick number of supported formats: | 0
ImageMagick supported formats | no value


This is result in command line

$ php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp7.1\php\ext\php_imagick.dll' - The specified module could not be found.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\xampp7.1\php\ext\php_imagick.dll' - The specified module could not be found.
 in Unknown on line 0
PHP 7.1.24 (cli) (built: Nov  8 2018 05:28:30) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

Im sure I push php_imagick.dll in ext/.

Any help?

@mlocati

This comment has been minimized.

Copy link

commented Dec 5, 2018

@abinhho it's not enough to have the php_imagick.dll file (this is the imagick PHP extension): you also need the ImageMagick DLL files.
To install them, see https://mlocati.github.io/articles/php-windows-imagick.html (or https://github.com/mlocati/powershell-phpmanager)

@abinhho

This comment has been minimized.

Copy link

commented Dec 6, 2018

@mlocati
I also installed both ImageMagick and php_imagick.dll but it's not right version. After used your ways, It's worked for me.

Many thanks !!! 🥇

@garyrowswell

This comment has been minimized.

Copy link

commented Dec 11, 2018

@mlocati very useful. Will you be updating for PHP 7.3 now out as stable?

@mlocati

This comment has been minimized.

Copy link

commented Dec 11, 2018

@garyrowswell That's not something under my control.

I simply use the compiled DLLs found in the releases or snapshot PECL builds, but there are no builds for PHP 7.3.
Maybe @Danack or @mkoppanen can do something about it...

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2018

@weltling must be able to trigger snapshot builds for PHP 7.3

@mlocati

This comment has been minimized.

Copy link

commented Dec 11, 2018

Any reason why there's only a snapshot build of imagick.dll for PHP 7.2?

@weltling

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2018

Thanks for the ping. The snapshot is now running, please check same location in a couple of hours.

@mlocati it's triggered manually. Whenever you need some, please ping :)

Thanks.

@mlocati

This comment has been minimized.

Copy link

commented Dec 11, 2018

@weltling

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2018

@mlocati AFAIR that one was done specifically to cover a PR with 7.2 related fixes. In general, arbittary snapshots are triggered manually. Except, when a new PHP version is in pre cycle, usually regular PECL releases are built also against some pre PHP version. For automatic builds it's essential something to be release on PECL, as the build bot only fetches tarballs from there.

Thanks.

@mlocati

This comment has been minimized.

Copy link

commented Dec 11, 2018

@mlocati very useful. Will you be updating for PHP 7.3 now out as stable?

@garyrowswell I updated https://mlocati.github.io/articles/php-windows-imagick.html so that it now includes PHP 7.3

PhpManager should be able to install imagick by using the snapshot flag:

Install-PhpExtension -Extension imagick -MinimumStability snapshot -Path C:\Path\To\PHP7.3
@garyrowswell

This comment has been minimized.

Copy link

commented Dec 11, 2018

@mlocati Excellent. The ImageMagick website lists 7.0.8-16 as latest release would that install the files necessary for the imagick php extension or can the pecl dep for imagemagick be updated to latest version as well?

@mlocati

This comment has been minimized.

Copy link

commented Dec 11, 2018

I absolutely don't know... just try it 😉

@garyrowswell

This comment has been minimized.

Copy link

commented Dec 12, 2018

@mlocati Using the latest from imagemagick.org does work, but php issues a warning. @weltling is there any chance the imagick extension can be recompiled for this latest imagemagick version? (if that's the right thing to ask)

Imagick was compiled against ImageMagick version 1799 but version 1800 is loaded. Imagick will run but may behave surprisingly

@chfabbro

This comment has been minimized.

Copy link

commented Dec 12, 2018

@garyrowswell I see new snapshot builds posted yesterday: https://windows.php.net/downloads/pecl/snaps/imagick/3.4.3/

Perhaps one of these was compiled for the new version?

@weltling

This comment has been minimized.

Copy link
Contributor

commented Dec 15, 2018

@garyrowswell no plans for dependency upgrades in the near future, at least this year. Could be reconsidered, if there are some hard weight issues with the current version.

Thanks.

@AnrDaemon

This comment has been minimized.

Copy link

commented Feb 14, 2019

Can somebody please push a button to release compiled Windows binaries on PECL website proper?

@Jan-E

This comment has been minimized.

@mialdi98

This comment has been minimized.

Copy link

commented Mar 12, 2019

For those of you like me who have never installed ImageMagick on Windows with PHP, let alone for PHP 7.2, I found this article very useful:
Install the ImageMagick PHP extension in Windows

The table here only goes up to PHP 7.1, so I also confirm that using these builds worked for me on PHP 7.2.2/Windows 10 (thread-safe version):

  • ImageMagick-7.0.7-11-vc15-x64.zip
  • php_imagick-3.4.3-7.2-ts-vc15-x64.zip

The workflow seems really clunky to me, but I did exactly as instructed:

  • Extract from php_imagick-….zip to the ext directory the php_imagick.dll file of your PHP installation
  • Extract from ImageMagick-….zip to the root PHP directory (where php.exe resides) the DLL files that start with (and there are a TON):
    CORE_RL_
    IM_MOD_RL_
  • Add this line to your php.ini file
    extension=imagick

And then to run a simple test (should output a 1):
php -r "print(class_exists('imagick'));"

If anyone knows a more elegant installation solution, please let me know 😸

works for 7.1 fine too! (win10 x32(x86) php 7.1 XAMPP 3.2.2)
but with small add u need to add this bunch of dlls in Apache\bin too.

@jerry-cbn

This comment has been minimized.

Copy link

commented Apr 17, 2019

into the PHP root directory (where you have php.exe), or to a directory in your PATH variable

Be careful !! The PHP root directory MUST BE known in the PATH variable.
And it's not necessarily the case (it wasn't for me, I using WAMP).
After added my PHP root directory to my PATH variable, it works like a charm.

@AnrDaemon

This comment has been minimized.

Copy link

commented Apr 17, 2019

The PHP root directory MUST BE known in the PATH variable.

That's absolutely not true.
Enough that you have a proper association to run *.php files.

@schmidtl4

This comment has been minimized.

Copy link

commented May 2, 2019

@mlocati - Awesome PHPManager power shell module. Fixed my imagick installation challenges and will be my goto module for managing PHP installation. Beautiful! Thanks.

@Danack

This comment has been minimized.

Copy link
Collaborator

commented May 3, 2019

I'm going to close this issue as I don't think there's anything that needs to be done within this repo to resolve any problems people are having.

If anyone wants to step up and be the 'official windows Imagick maintainer' to deal with this sort of thing, that would be awesome.

@Danack Danack closed this May 3, 2019
@patieru12

This comment has been minimized.

Copy link

commented Oct 2, 2019

I also confirm this issue on Windows with PHP 7.2.x

Update: got it to work with this snapshot http://windows.php.net/downloads/pecl/snaps/imagick/3.4.3/
using only the php_imagick.dll from the archive and Imagick 7.0.7-22

Works Fine for me great thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.