[英]How to install php_imagick on wamp64
I've been trying to install php_imagick on wamp64 without any luck.我一直在尝试在 wamp64 上安装 php_imagick 没有任何运气。
The desired goal is for WordPress to stop showing the error message:期望的目标是让 WordPress 停止显示错误消息:
The optional module, Imagick, is not installed or has been disabled.
可选模块 Imagick 未安装或已被禁用。
You can also skip reading and view the images attached below.您也可以跳过阅读并查看下面附加的图像。
My setup:我的设置:
Wamp64 Windows 10 Release Version 3.2.3.3 64 Bits [Windows Build: 19041]
PHP Version: 7.4.9
Build Date: Aug 4 2020 11:45:36
Windows: NT *username* 10.0 build 19041 (Windows 10) AMD64
Compiler Visual: C++ 2017
Architecture: x64
Loaded Configuration File: C:\wamp64\bin\apache\apache2.4.46\bin\php.ini
Thread Safety: enabled
I tried installing the following ImageMagick files:我尝试安装以下 ImageMagick 文件:
1) ImageMagick-7.0.10-30-Q16-HDRI-x64-dll.exe
----A) php_imagick-3.4.3rc1-5.6-ts-vc11-x64.zip
----B) php_imagick-3.4.3rc1-7.1-ts-vc14-x64.zip
2) ImageMagick-7.0.10-30-Q16-x64-dll.exe
----A) php_imagick-3.4.3rc1-7.1-ts-vc14-x64.zip
----B) php_imagick-3.4.4rc2-7.3-ts-vc15-x64.zip
3) ImageMagick-6.9.3-7-Q16-x64-dll.exe (Current)
----A) php_imagick-3.4.4rc2-7.3-ts-vc15-x64.zip (Current)
----B) php_imagick-3.4.3rc1-7.1-ts-vc14-x64.zip
----C) php_imagick-3.4.3rc1-5.6-ts-vc11-x64.zip
What I did:我做了什么:
I first installed the EXE file and then extracted from the zip file just the php_imagick.dll file into this folder:我首先安装了 EXE 文件,然后从 zip 文件中将 php_imagick.dll 文件解压缩到此文件夹中:
C:\wamp64\bin\php\php7.4.9\ext
Which matches my currently used PHP version (see images later for more information[php.ini]).与我当前使用的 PHP 版本匹配(有关更多信息,请参见稍后的图片[php.ini])。
I tried restarting Wamp, rebuilding symlinks by switching PHP/Apache versions.我尝试重新启动 Wamp,通过切换 PHP/Apache 版本来重建符号链接。
Will also be worth mentioning that I at one point tried extracting the full zip into the 'ext' folder under a folder named 'php_imagick' as shown below and did manage to get this error:还值得一提的是,我曾尝试将完整的 zip 解压缩到名为“php_imagick”的文件夹下的“ext”文件夹中,如下所示,但确实遇到了此错误:
C:\wamp64\bin\php\php7.4.9\ext\php_imagick\php_imagick.dll (The specified procedure could not be found.)
but mostly I receive these errors:但大多数情况下我会收到这些错误:
[25-Sep-2020 08:58:50 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_imagick.dll' (tried: c:/wamp64/bin/php/php7.4.9/ext/php_imagick.dll (The specified module could not be found.), c:/wamp64/bin/php/php7.4.9/ext/php_php_imagick.dll.dll (The specified module could not be found.)) in Unknown on line 0
When I install Magick using the EXE, I make sure to check the install to the path
, Change the folder to C:\\ImageMagick
, and install the legacy drivers
if possible, as suggested on Stack OverFlow.当我使用 EXE 安装 Magick 时,我一定要检查
install to the path
,将文件夹更改为C:\\ImageMagick
,如果可能,请安装legacy drivers
,如 Stack OverFlow 上的建议。 (I also make sure to uninstall the last version I tried each time) (我还确保卸载我每次尝试的最后一个版本)
I have Visual Studio installed and a bunch of redistributables and also both x86 and x64 versions of these:我安装了 Visual Studio 和一堆可再发行组件,还有 x86 和 x64 版本:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
http://www.microsoft.com/en-us/download/details.aspx?id=30679 http://www.microsoft.com/en-us/download/details.aspx?id=30679
Without any luck, I went ahead and read several Stack OverFlow posts and could not find a solution.运气不好,我继续阅读了几篇 Stack OverFlow 帖子,但找不到解决方案。
How to install ImageMagick with Wampserver 3.0.0 64? 如何使用 Wampserver 3.0.0 64 安装 ImageMagick?
step-by-step instructions for installing IMAGEMAGICK on WAMP? 在 WAMP 上安装 IMAGEMAGICK 的分步说明?
Installing php_imagick.dll PHP extension on wampserver 2.2 在 wampserver 2.2 上安装 php_imagick.dll PHP 扩展
Unable to install php_imagick.dll on wamp 无法在 wamp 上安装 php_imagick.dll
Imagick delegates installation on WAMP Imagick 代表 WAMP 上的安装
How to install ImageMagick with Wampserver 3.0.0 64? 如何使用 Wampserver 3.0.0 64 安装 ImageMagick?
step-by-step instructions for installing IMAGEMAGICK on WAMP? 在 WAMP 上安装 IMAGEMAGICK 的分步说明?
Installing php_imagick.dll PHP extension on wampserver 2.2 在 wampserver 2.2 上安装 php_imagick.dll PHP 扩展
Unable to install php_imagick.dll on wamp 无法在 wamp 上安装 php_imagick.dll
Imagick delegates installation on WAMP Imagick 代表 WAMP 上的安装
WAMP PHP Startup Error: Unable to load dynamic library WAMP PHP 启动错误:无法加载动态库
Installing ImageMagick extension with php/windows 使用 php/windows 安装 ImageMagick 扩展
Linker error when trying to use ImageMagick as static libraries with Visual Studio compiler 尝试将 ImageMagick 用作 Visual Studio 编译器的静态库时出现链接器错误
Installing Magick++ in Visual C++ 2010 在 Visual C++ 2010 中安装 Magick++
Installing Magick++ in visual studio 2019 在 Visual Studio 2019 中安装 Magick++
ImageMagick with Visual Studio 带有 Visual Studio 的 ImageMagick
WampServer and Imagemagick, imagick php module not recogized WampServer 和 Imagemagick,无法识别 imagick php 模块
Cannot load imagick library 无法加载 imagick 库
ImageMagick not working ImageMagick 不工作
What can I try next?我接下来可以尝试什么?
I hired a freelancer to fix this for us.我聘请了一名自由职业者来为我们解决这个问题。
For those of you who already fixed this before using Chocolatey and now seeing this error message again simply update Wamp and ImageMagick using the choco commands provided on their website and then read my note under
4)
for more information对于那些在使用 Chocolatey 之前已经解决了这个问题并且现在再次看到此错误消息的人,只需使用他们网站上提供的 choco 命令更新 Wamp 和 ImageMagick,然后阅读我在
4)
下的注释以获取更多信息
Run PowerShell as Admin以管理员身份运行PowerShell
Use the same methods to Download Wamp64 https://chocolatey.org/packages/wamp-server使用相同的方法下载Wamp64 https://chocolatey.org/packages/wamp-server
Download https://chocolatey.org/packages/imagemagick下载https://chocolatey.org/packages/imagemagick
Download https://windows.php.net/downloads/pecl/deps/ImageMagick-7.0.7-11-vc15-x64.zip下载https://windows.php.net/downloads/pecl/deps/ImageMagick-7.0.7-11-vc15-x64.zip
Extract And Copy all CORE_RL
and IM_MOD_RL
DLL files into C:\\wamp\\bin\\php\\php7.4.9
where php.exe
is located提取并复制所有
CORE_RL
和IM_MOD_RL
DLL文件到php.exe
所在的C:\\wamp\\bin\\php\\php7.4.9
(Do not run any EXE file from here as we already installed ImageMagick) (不要从这里运行任何 EXE 文件,因为我们已经安装了 ImageMagick)
Download https://windows.php.net/downloads/pecl/releases/imagick/3.4.4/php_imagick-3.4.4-7.4-ts-vc15-x64.zip下载https://windows.php.net/downloads/pecl/releases/imagick/3.4.4/php_imagick-3.4.4-7.4-ts-vc15-x64.zip
Extract and Copy just the php_imagick.dll
file to C:\\wamp\\bin\\php\\php7.4.9\\ext
将
php_imagick.dll
文件提取并复制到C:\\wamp\\bin\\php\\php7.4.9\\ext
Open your php.ini file by left-clicking Wamp->PHP->php.ini and then make sure you delete all leftovers and add below any extention=
line the code below:通过左键单击 Wamp->PHP->php.ini打开php.ini 文件,然后确保删除所有剩余内容并在任何
extention=
行下方添加以下代码:
extention=imagick
扩展=想象
(Apparently, New PHP versions require writing it without the "php_"...".dll" parts)
This is by far the only solution I could get running.到目前为止,这是我可以运行的唯一解决方案。
choco:巧克力:
Google = https://www.google.com/search?q=chocolatey谷歌 = https://www.google.com/search?q=chocolatey
2019 = http://web.archive.org/web/20190101113929/https://chocolatey.org/ 2019 = http://web.archive.org/web/20190101113929/https://chocolatey.org/
2018 = http://web.archive.org/web/20180414000310/https://chocolatey.org/ 2018 = http://web.archive.org/web/20180414000310/https://chocolatey.org/
Enjoy享受
I use wampserver 3.2.3 64bit together with PHP 7.3.我使用 wampserver 3.2.3 64 位和 PHP 7.3。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.