没有不值得去解决的问题,也没有不值得去学习的技术!

Installing the ImageMagick PHP Extension on Windows 10 64-bit with PHP 7.0.22

Check phpinfo(), which works normally

1. Open http://pecl.php.net/package/imagick/3.4.3/windows and download 7.0 Thread Safe (TS) x64, as shown in Figure 1

Open http://pecl.php.net/package/imagick/3.4.3/windows and download 7.0 Thread Safe (TS) x64
Figure 1

2. After extracting, copy php_imagick.dll to C:\php-7.0.22\ext, as shown in Figure 2

After extracting, copy php_imagick.dll to C:\php-7.0.22\ext
Figure 2

3. Run php-cgi.exe -b 127.0.0.1:9000-c C:/php-7.0.22/php.ini, which throws the error: PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/php-7.0.22/ext\php_imagick.dll’, as shown in Figure 3

3. Run php-cgi.exe -b 127.0.0.1:9000-c C:/php-7.0.22/php.ini, which throws the error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php-7.0.22/ext\php_imagick.dll'
Figure 3

4. Open https://www.imagemagick.org/script/download.php#windows and download ImageMagick-7.0.6-10-Q16-x64-dll.exe, as shown in Figure 4

Open https://www.imagemagick.org/script/download.php#windows and download ImageMagick-7.0.6-10-Q16-x64-dll.exe
Figure 4

5. Install ImageMagick-7.0.6-10-Q16-x64-dll.exe, selecting all options, as shown in Figure 5

Install ImageMagick-7.0.6-10-Q16-x64-dll.exe, selecting all options
Figure 5

6. Run convert –version, which works normally, as shown in Figure 6

Run convert --version, which works normally
Figure 6

7. Uninstall ImageMagick-7.0.6, as shown in Figure 7

Uninstall ImageMagick-7.0.6
Figure 7

8. The error persists. Open http://windows.php.net/downloads/pecl/deps/ and download ImageMagick-6.9.3-7-vc14-x64.zip, as shown in Figure 8

The error persists. Open http://windows.php.net/downloads/pecl/deps/ and download ImageMagick-6.9.3-7-vc14-x64.zip
Figure 8

9. Create a new directory: C:\ImageMagick-6.9.3-7-vc14-x64, as shown in Figure 9

Create a new directory: C:\ImageMagick-6.9.3-7-vc14-x64
Figure 9

10. Copy all files from the directory: D:\Soft\ImageMagick-6.9.3-7-vc14-x64\bin, as shown in Figure 10

Copy all files from the directory: D:\Soft\ImageMagick-6.9.3-7-vc14-x64\bin
Figure 10

11. Copy them to the directory: C:\ImageMagick-6.9.3-7-vc14-x64, as shown in Figure 11

Copy them to the directory: C:\ImageMagick-6.9.3-7-vc14-x64
Figure 11

12. Create a new environment variable: C:\ImageMagick-6.9.3-7-vc14-x64, as shown in Figure 12

Create a new environment variable: C:\ImageMagick-6.9.3-7-vc14-x64
Figure 12

13. Create a new system variable: MAGICK_HOME, with the value: C:\ImageMagick-6.9.3-7-vc14-x64, as shown in Figure 13

Create a new system variable: MAGICK_HOME, with the value: C:\ImageMagick-6.9.3-7-vc14-x64
Figure 13

14. Restart the machine and run php-cgi.exe -b 127.0.0.1:9000-c C:/php-7.0.22/php.ini, which works normally, as shown in Figure 14

Restart the machine and run php-cgi.exe -b 127.0.0.1:9000-c C:/php-7.0.22/php.ini, which works normally
Figure 14

15. Run convert –version, which works normally. The version is updated to: ImageMagick 6.9.3-7 Q16 x64, as shown in Figure 15

Run convert --version, which works normally. The version is updated to: ImageMagick 6.9.3-7 Q16 x64
Figure 15

16. Check phpinfo(), which works normally, as shown in Figure 16

Check phpinfo(), which works normally
Figure 16

Note: Attachment download

Attachment

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系