PHP7 use of Imagick pits

Source: Internet
Author: User
Tags imagemagick zts

Imagick is an extension of PHP that uses the API provided by ImageMagick to create and modify images, but these operations have been packaged in the extension Imagick and are ultimately called the API provided by ImageMagick.

ImageMagick is a set of software series, mainly used for image creation, editing and conversion, detailed explanation see ImageMagick official website Http://www.imagemagick.org/,ImageMagick and GD performance is much higher, If you are dealing with a large number of pictures, it is more able to reflect the performance of ImageMagick.

method One:
1. Download and install ImageMagick
Linux Code
1:wget ftp://mirror.aarnet.edu.au/pub/imagemagick/imagemagick-6.6.8-10.tar.gz  2:  -XZVF Imagemagick-6.6.8-10.tar. GZ   4:./configure--prefix=/usr/local/imagemagick  5:make  6:make Install  


2. Download and install Imagick(PHP extension)
Note: Installing this extension does not require installation of ImageMagick
Find the latest version of Imagick from Http://pecl.php.net/package/imagick
Linux Code
1:wget http://pecl.php.net/get/imagick-3.1.0rc1.tgz  2:  -xzvf imagick-3.1.  0rc1  4:phpize  5:./configure--with-php-config=/usr/local/php/bin/php-config--with-imagick=/usr/ local/imagemagick  6:make  7:make Install  

The make install execution results show:
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files:/usr/local/php/include/php/

Generate imagick.so to/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/, and then manually configure the php.ini to take effect   Method Two:
1. run the following command in turn yum install ImageMagick yum install ImageMagick-devel yum install php-Pear installation php--y install php-devel2. Install the C compiler yum install GCC if you can't install GCC, use this command: Yum installs gcc gcc-c++ autoconf automake3. installing Imagick pecl install Imagick 4. load Imagick to PHP in /etc/php.ini plus extension=imagick.  So 5. Restart the service httpd restartphpinfo() or run Php-m | grep Imagick to see if the installation was successful

After that, if it's not going to work,

This can be done in CentOS.

Yum Install Ghostscript

This is a file extractor, especially the operation of the file

PHP7 use of Imagick pits

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.