Bobcares

Imagick php install – How to install the extension easily

by | Feb 7, 2021

Looking forward to Imagick php install? We can help you.

We can use Imagick to create and modify images using the ImageMagick library. It is the most popular PHP extension.

Here, at Bobcares, as part of our Server Management Services, we assist our customers with several PHP queries.

Today, let’s get into the details on how our Support Engineers help in the installation of Imagick.

 

What is Imagick

Imagick is the popular PHP extension used for helping ImageMagick software.

Here, ImageMagick is the software to create edit convert, and/or manipulate images with the help of Imagick PHP extension.

We can use ImageMagick without Imagick. However, we need both Imagick and ImageMagick installed to run it within the PHP code.

Now let’s see how our Support Engineers install Imagick.

 

Imagick php install

At Bobcares, with more than a decade of expertise in managing servers, we see many customers requesting to install Imagick.

Now, let’s see how our Support Engineers help them with the installation of Imagick.

  1. Initially, we login to the server and then run the following command.
    apt-get install php-imagick
  2. To verify the Imagick extension we run:
    php -m | grep imagick
  3. Finally, we restart the Apache service. Otherwise, we won’t be able to use the Imagick class in users’ PHP code. We use the following command to restart the Apache service:
    service apache2 restart

Once we finish the installation, we add an info page to verify the Imagick PHP extension.

Thus, we installed the Imagick successfully.

Common installation errors

Now that we have seen how the installation works, our Support Techs gives an insight into a few common errors it might cause.

  • ERROR: `/tmp/pear/temp/imagick/configure –with-imagick’ failed

Some of our customers came across this error while trying to install Imagick using the command:

pecl install imagick
...

checking ImageMagick MagickWand API configuration program... found in /usr/bin/Wand-config checking if ImageMagick version is at least 6.2.4... configure: error: no. You need at least Imagemagick version 6.2.4 to use Imagick. ERROR: `/tmp/pear/temp/imagick/configure --with-imagick' failed

It was found that using “pecl install imagick-beta, also sometimes result in the same error.

In order to resolve this, we follow the below steps:

  1. Initially, we remove the imagemagick if it is already present.
    apt-get remove graphicsmagick-libmagick-dev-compat imagemagick imagemagick-common
    apt-get autoremove
  2. Then we install libmagickwand-dev:
    apt-get install libmagickwand-dev
  3. Finally, install Imagick via pecl:
    pecl install imagick-beta
  • Error: cannot download “pecl/imagick”

While installing the Imagick module in whm, one of our customers came across the following error:

downloading imagick-3.0.1.tgz ...
Starting to download imagick-3.0.1.tgz (Unknown size)
....done: 3,582 bytes
Could not get contents of package "/root/tmp/pear/cache/imagick-3.0.1.tgz". Invalid tgz file.
Download of "pecl/imagick" succeeded, but it is not a valid package archive
Error: cannot download "pecl/imagick"
Download failed
install failed
The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626

This may mostly be due to http://pecl.php.net being down. Hence, as an alternative, install it as follows:

apt-get install php-imagick
php -m | grep imagick
service apache2 restart

[Need assistance with the installation? – We can you.]

 

Conclusion

In short, Imagick is the most popular PHP extension which helps to create edit convert, and/or manipulates images. Today, we saw how our Support Engineers help the customer in installing the Imagick PHP extension.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.