dqwh1218 2017-11-25 19:19
浏览 234

Imagick无法打开模块文件

I'm trying to use Imagick with PHP. I have installed the program, replaced the core dll files, loaded the dll extension with xampp, but now I get this error:

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

This is the line causing the problem: $image->setImageFormat('png');. I took a look to the AppData/Local folder, but there's no ImageMagick folder. If I place it there manually, it throws another error. I use:

  • ImageMagick-7.0.7-11-Q16-x86-dll
  • php_imagick-3.4.3-7.1-ts-vc14-x86
  • 写回答

1条回答 默认 最新

  • duanmen8491 2017-11-30 20:18
    关注

    Downlod the latest version from here 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. Optionally you can tick legacy utilities (convert, mogrify) during installation. and check in 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


    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.

    extension=php_imagick.dll
    

    Than, go to http://windows.php.net/downloads/pecl/deps/ find needed version

     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.

    MUST WORK!

    P.S. You can also find all the stuff from mentioned above resources for PHP 7.2 except pecl library. Need to wait for a while.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分