dqv2743 2017-06-06 22:31
浏览 54
已采纳

Imagick代表在WAMP上安装

I would like to know how to download the correct Imagemagick decode delegates from http://www.imagemagick.org/download/delegates/, as well what to do with them afterwards.

I'm using:

  • Imagick 3.4.3RC1, 6.9.3-7 Q16 x64 2016-03-27
  • PHP 5.6.25
  • WAMP 3.0.0.25 on Windows 7

I've been looking on Imagick and Stackoverflow threads, but the ones I found were mostly concerning errors with the delegates after they had them, and none of them used WAMP. Any help would be appreciated

  • 写回答

1条回答 默认 最新

  • doutizhou5312 2017-06-07 23:24
    关注

    In the past this has worked by installing ImageMagick and then downloading a compatible imagick PHP extension.

    But currently there seems to be a temporary "Catch 22" situation with ImageMagick and imagick.

    imagick versions need to be compiled against a specific version of ImageMagick and currently that has not been done for imagick against the new ImageMagick 7 although I am informed by @danack that imagick is ready to be compiled but nobody has done so yet, or at least they have not shared the binary.

    Unfortunately ImageMagick do not retain older versions of their install i.e. ImageMagick 6.? so if you dont already have a version of the installer the only availaible one is ImageMagick 7

    The Catch 22

    Therefore the only versions of imagick available will only work with ImageMagick 6 and you cannot download ImageMagick 6 as the ImageMagick people do not retain old version of their installer.

    The work around

    However, if you only want ImageMagick to work within a PHP/Apache environment this proceedure works.

    The versions of the following must match your WAMPServer, so if you installed WAMPServer 32bit use the 32bit versions of ImageMagick and Imagick, if you use WAMPServer 64bit, use the 64bit versions of ImageMagick and Imagick. The VC14 versions should work with WAMPServers Apache 2.4.x versions

    1. Download ImageMagick-6.9.3-7-vc14-x86.zip (32bit) or ImageMagick-6.9.3-7-vc14-x64.zip (64bit) from http://windows.php.net/downloads/pecl/deps/ depending upon which WAMPServer version you are using i.e. 32bit or 64bit

    2. Download php_imagick-3.4.3-5.6-ts-vc11-x86.zip (32bit) or php_imagick-3.4.3-5.6-ts-vc11-x64.zip (64bit) from http://windows.php.net/downloads/pecl/releases/imagick/3.4.3/ depending upon which WAMPServer version you are using i.e. 32bit or 64bit

    3. Create a folder to hold ImageMagick, I used wamp\imagemagick

    4. Unzip whichever of the ImageMagick's you downloaded i.e. ImageMagick-6.9.3-7-vc14-x86.zip or ImageMagick-6.9.3-7-vc14-x64.zip into the wamp\imagemagick folder

    5. Unzip whichever of the imagick version you downloaded php_imagick-3.4.3-5.6-ts-vc11-x86.zip (32bit) or php_imagick-3.4.3-5.6-ts-vc11-x64.zip (64bit) into a temp folder and copy the php_imagick.dll from the temp folder to your wamp\bin\php\php5.6.25\ext folder

    6. Edit your 'php.inifile to add the extension. Use the wampmanager menus so you edit the correct file (left click) wampmanager->PHP->php.ini Add the lineextension=php_imagick.dllinto the section ofphp.inithat contains the otherextension` parameters.

    7. Add the folder to your windows PATH using Control Panel -> System -> Advanced System Setting Select the Advanced Tab Click the Environment Variables Button Add C:\wamp\imagick; to the PATH variable in the System Variables section [I dont like adding anything to the PATH for WAMPServer, but I cannot think of a better solution for now and as this way will work for multiple versions of PHP it is not actually so bad]

    Start WAMPServer, or restart Apache. It may be necessary to reboot windows, it was for me, but maybe that was because I tried a number of things before I got to this solution.

    Check with phpinfo() you should see enter image description here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 chaquopy python 安卓
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥30 vmware exsi重置后登不上
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题