简体   繁体   English

imagick无法打开模块文件

[英]Imagick unable to open module file

I'm trying to use Imagick with PHP. 我正在尝试将Imagick与PHP结合使用。 I have installed the program, replaced the core dll files, loaded the dll extension with xampp, but now I get this error: 我已经安装了该程序,替换了核心dll文件,并使用xampp加载了dll扩展名,但是现在出现此错误:

unable to open module file `C:\\Users\\sudom\\AppData\\Local\\ImageMagick\\IM_MOD_RL_png_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/830 无法打开模块文件“ C:\\ Users \\ sudom \\ AppData \\ Local \\ ImageMagick \\ IM_MOD_RL_png_.dll”:无此类文件或目录@ warning / module.c / GetMagickModulePath / 830

This is the line causing the problem: $image->setImageFormat('png'); 这是导致问题的行: $image->setImageFormat('png'); . I took a look to the AppData/Local folder, but there's no ImageMagick folder. 我看了看AppData / Local文件夹,但是没有ImageMagick文件夹。 If I place it there manually, it throws another error. 如果我手动将其放置在那里,则会引发另一个错误。 I use: 我用:

  • ImageMagick-7.0.7-11-Q16-x86-dll ImageMagick的-7.0.7-11-Q16-x86的DLL
  • php_imagick-3.4.3-7.1-ts-vc14-x86 php_imagick-3.4.3-7.1-TS-VCl 4-86

Downlod the latest version from here https://www.imagemagick.org/script/download.php 从此处下载最新版本https://www.imagemagick.org/script/download.php

ImageMagick-7.0.7-12-Q16-x64-dll.exe

or 要么

ImageMagick-7.0.7-12-Q16-x86-dll.exe

install, make sure adding the Imagick folder to the system PATH. 安装时,请确保将Imagick文件夹添加到系统PATH。 Optionally you can tick legacy utilities (convert, mogrify) during installation. (可选)您可以在安装过程中勾选旧版实用程序(转换,迁移)。 and check in cmd 'magick -version' 并签入cmd'magick -version'

c:\\convert --version Version: ImageMagick 7.0.7-12 Q16 x64 2017-11-29 http://www.imagemagick.org Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Visual C++: 180040629 Features: Cipher DPC Modules OpenMP Delegates (built-in): bzlib cairo flif freetype gslib jng jp2 jpeg lcms lqr openexr pangocairo png ps raw rsvg tiff webp xml zlib c:\\ convert --version版本:ImageMagick 7.0.7-12 Q16 x64 2017-11-29 http://www.imagemagick.org版权所有:版权所有(C)1999-2015 ImageMagick Studio LLC许可证: http:// www .imagemagick.org / script / license.php Visual C ++:180040629功能:密码DPC模块OpenMP委托(内置):bzlib cairo flif freetype gslib jng jp2 jpeg lcms lqr openexr pangocairo png ps原始rsvg tiff webp xml zlib


Download php_imagick.dll from https://pecl.php.net/package/imagick/3.4.3/windows meets your php version requirments, put in to ext folder of php and add it to php.ini file. https://pecl.php.net/package/imagick/3.4.3/windows下载php_imagick.dll,Windows符合您的php版本要求,将其放入php的ext文件夹并将其添加到php.ini文件中。

extension=php_imagick.dll

Than, go to http://windows.php.net/downloads/pecl/deps/ find needed version 然后,转到http://windows.php.net/downloads/pecl/deps/查找所需版本

 3/27/2016  5:32 PM     32707238 ImageMagick-6.9.3-7-vc11-x64.zip
 3/27/2016  5:33 PM     31517070 ImageMagick-6.9.3-7-vc11-x86.zip
 3/27/2016  5:34 PM     38717224 ImageMagick-6.9.3-7-vc14-x64.zip
 3/27/2016  5:34 PM     37376244 ImageMagick-6.9.3-7-vc14-x86.zip

download package and put all the DLLs files from ImageMagick-6.9.3-7-vc1x-xxx.zip\\bin\\ except ImageMagickObject.dll to ...\\apache\\bin\\ and restart the apache service. 下载包,然后将ImageMagick-6.9.3-7-vc1x-xxx.zip \\ bin \\中除ImageMagickObject.dll以外的所有DLL文件放入... \\ apache \\ bin \\中,然后重新启动apache服务。

MUST WORK! 必须工作!

PS You can also find all the stuff from mentioned above resources for PHP 7.2 except pecl library. PS:除了pecl库,您还可以从PHP 7.2的上述资源中找到所有内容。 Need to wait for a while. 需要等待一段时间。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM