Imagick php windows

后端 未结 7 537
甜味超标
甜味超标 2020-12-30 14:55

I am trying to use iMagick in Symfony2.

I am using PHP 5.4.16 and all i have done :

1-Copy php_imagick_nts.dll from php5-4 directory from the extracted http:

7条回答
  •  礼貌的吻别
    2020-12-30 15:48

    I use :Wamp 2.4, PHP 5.4.16, Apache 2.4.4, ImageMagick 6.8.0-3 2012-10-24 Q16, Imagick 3.1.0RC2 - all 32bit, OS Win7 32bit

    Instructions given by fmstoun worked for me perfectly. Since I spent a lot of hours trying to make the dll work, I wanted to add on to steps given by fmstoun.

    • Do restart your PC.
    • Use the full path to the image, for example:
    $image = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/images/test.jpg');
    • Make sure your system environment has 1 single entry for : C:/imagemagick and no more environment variables for imagemagick. If any previous installations have the path, then remove those paths and restart your PC
    • Make sure
      http : / / localhost/
      of wamp shows 'imagick' as loaded extension
    • If extension is loaded properly, it has to show up in phpinfo() also as:
    • imagick module  | enabled
    • ImageMagick version|ImageMagick 6.8.0-3 2012-10-24 Q16 
      and some more information about imagemagick.

    Considering the date of this post, the latest version of imagemagick provided on the official site is: ImageMagick-6.8.8-1-Q16-x86-dll.exe which fails to load the extension (as seen in apache error logs after a restart). Hence use the version mentioned by fmstoun.

    Hope this answer saves couple of hours of effort and saves time required to go through around 15 SO questions on same topic and also different forums.

提交回复
热议问题