简体   繁体   English

如何在 wamp64 上安装 php_imagick

[英]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?我接下来可以尝试什么?

Wamp 版本

我试过的版本

Wamp 设置

typo in line 955: .php=.dll第 955 行中的错字:.php=.dll PHP.INI 和修订

PHPINFO 测试文件

一切开始的地方 - WordPress

PHPINFO - 运行测试文件

I hired a freelancer to fix this for us.我聘请了一名自由职业者来为我们解决这个问题。

  • Uninstall any versions of WampServer and ImageMagick you have installed卸载您已安装的任何版本的 WampServer 和 ImageMagick
    • Don't forget to backup your database and www folder before you uninstall卸载前不要忘记备份数据库和www文件夹
    • We are going to install a trustable software called Chocolatey that will help us fix a bunch of errors with Wamp64 and it's extensions as well as help us update those applications with one command.我们将安装一个名为 Chocolatey 的可信赖软件,它将帮助我们修复 Wamp64 及其扩展的一系列错误,并帮助我们使用一个命令更新这些应用程序。

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)下的注释以获取更多信息


  1. Run PowerShell as Admin以管理员身份运行PowerShell

  2. Use the same methods to Download Wamp64 https://chocolatey.org/packages/wamp-server使用相同的方法下载Wamp64 https://chocolatey.org/packages/wamp-server

    • Run Wamp from the newly created shortcut on your desktop从桌面上新创建的快捷方式运行 Wamp
    • Change the PHP version to 7.4.9 or the latest and only then move将 PHP 版本更改为 7.4.9 或最新版本,然后才移动
      to the other steps到其他步骤
    • Don't worry about the fact the folder is named Wamp and not Wamp64.不要担心文件夹名为 Wamp 而不是 Wamp64 的事实。 It's still the 64bit version.它仍然是64位版本。 You can check this in the about section of Wamp您可以在 Wamp 的关于部分查看
  3. Download https://chocolatey.org/packages/imagemagick下载https://chocolatey.org/packages/imagemagick

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

    • Note: If that doesn't work, they probably updated again.注意:如果这不起作用,他们可能会再次更新。 Just try the same methods using newer versions then these.只需使用较新的版本尝试相同的方法然后这些。 I will first try more recent versions of php_imagick instead of replacing the ImageMagick core DLL files.我将首先尝试更新版本的 php_imagick 而不是替换 ImageMagick 核心 DLL 文件。 One thing I will not do is give up.我不会做的一件事就是放弃。
  5. 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_RLIM_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)

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

  7. Extract and Copy just the php_imagick.dll file to C:\\wamp\\bin\\php\\php7.4.9\\extphp_imagick.dll文件提取复制C:\\wamp\\bin\\php\\php7.4.9\\ext

  8. 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)
  1. Restart Wamp by closing it and reopening it from its shortcut通过关闭Wamp并从其快捷方式重新打开它来重新启动Wamp

WordPress 停止抱怨

Enjoy享受

I use wampserver 3.2.3 64bit together with PHP 7.3.我使用 wampserver 3.2.3 64 位和 PHP 7.3。

  • Copying the CORE_RL and IM_MOD_RL DLLs into the PHP root direcory as orr burgel recommended in item #5 did not work for me.复制CORE_RL和IM_MOD_RL DLL文件到PHP根猪病的ORR burgel推荐的项目#5并没有为我工作。
  • I had to copy these DLLs into c:\\wamp64\\bin\\apache\\apache2.4.41\\bin.我不得不将这些 DLL 复制到 c:\\wamp64\\bin\\apache\\apache2.4.41\\bin。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:c:/ wamp64或PATH中的PHP - error: c:/wamp64 or PHP in PATH 如何使用 wamp64 连接到 MSSQL DB - How to connect to MSSQL DB with wamp64 无法在Wamp上安装php_imagick.dll - Unable to install php_imagick.dll on wamp 如何更正未定义的索引:第12行的C:\\ wamp64 \\ www \\ Form \\ addtodatabase.php中的名字错误 - how to rectify Undefined index: firstname in C:\wamp64\www\Form\addtodatabase.php on line 12 error 使用WAMP64的OCI8配置 - OCI8 configuration with WAMP64 如何解决:PDOStatement :: execute()期望参数1为数组,在第64行的C:\\ wamp64 \\ www \\ invoiceTem01-Create.php中给出字符串 - How to fix : PDOStatement::execute() expects parameter 1 to be array, string given in C:\wamp64\www\invoiceTem01-Create.php on line 64 在C:\\ wamp64 \\ www \\ html \\ index.php中找不到“Spatie \\ Browsershot \\ Browsershot”类 - Class 'Spatie\Browsershot\Browsershot' not found in C:\wamp64\www\html\index.php 如何在Bitnami的wamp-stack PHP v7.1.4上安装和使用ImageMagick/Imagick - How to install and use ImageMagick/Imagick on Bitnami's wamp-stack PHP v7.1.4 解析错误:语法错误,第 9 行 C:\\wamp64\\www\\bluepeatshop\\db_connect.php 中出现意外的 ':' - Parse error: syntax error, unexpected ':' in C:\wamp64\www\bluepeatshop\db_connect.php on line 9 在WAMP(WAMP64)中使用CLI的正确方法,同时在Windows 10上的多个PHP版本之间切换 - Proper Way to CLI PHP within WAMP (WAMP64), while switching between Multiple PHP Versions on Windows 10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM