Imagick Installation of PHP extensions

Source: Internet
Author: User
Tags imagemagick phpinfo

In the recent PHP project, you need to use the transduction and thumbnail effects, in the local Windows development environment, the installation process encountered a lot of problems, here to share with you.

PHP official website, a large group of foreigners can not understand how to install this thing, the main reason is that the PHP version of the complex, there are x86 x64 NTS TS, the corresponding Imagick version is not necessarily the same, imagick the first pass is easy, there is always a way to install, Imagick corresponding to the ImageMagick program is not necessarily, and the emergence of a complex version, even if the official website of the dependent version has no effect, at the same time there is no official any place to give a reasonable installation method, is abnormal. From Chinese to English, from PHP documents to Baidu, Google data, various versions, all are pits!

Use environment

Installation steps

Download appropriate Imagick extensions and ImageMagick programs based on your environment

1. Download extension

One: http://windows.php.net/downloads/pecl/releases/imagick/
Two: Https://pecl.php.net/package/imagick
Important: Note the PHP version of TS or NTS x86 or x64
This is based on phpinfo ()

So I should download Imagick 3.4.3 version PHP5.6 Non Thread Safe (NTS) X86 expansion--php_imagick-3.4.3-5.6-nts-vc11-x86.zip

2. Installation and expansion
    1. After extracting the above files, copy the Php_imagick.dll to the Php/ext directory, or any other directory where you store your extension.
    2. Modify PHP.ini plus extension=php_imagick.dll, note that PHP may have multiple ini, with phpinfo as the subject
    3. At this time to copy the other DLLs extracted from the above file directory to the PHP directory, restart Apache, at this time Phpinfo display expansion installation success, but ImageMagick number of supported formats 0, to the successful installation of half
3 Download ImageMagick Program

: http://windows.php.net/downloads/pecl/deps/
ImageMagick also has official website download, here does not encourage the official download from ImageMagick, their website I did not find the historical version download, the chance of installation failure is very large
Download the version that is consistent with the Phpinfo prompt, and you need to note 1. Software version corresponds to 2.VC11 or Vc14 3.x86 or x64 to Phpinfo, my

So I downloaded imagemagick-6.9.3-7

4 Installing the ImageMagick program
    1. After extracting the downloaded files, the whole program is copied into a directory without space and Chinese characters E:\Program files (x86) \
    2. Configure the environment variables, in the "This PC" right "properties", click "Advanced" "Environment variable", in "system variables" find the key path data, double-click Path, select "New", will just put the program's directory "E:\Program Files (x86) \ Imagemagick\bin "Fill in Can
    3. All of the "E:\Program Files (x86) \imagemagick\bin" directories. DLL ' suffix file into the root directory of PHP, there should be 145

 

Restart your computer

Imagick Installation of PHP extensions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.