Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageMagick module not available with this PHP installation on Laravel 5.4 with PHP 7

Currently, I have cloned a project. I have PHP 7 on Ubuntu 14.04 64-bit.

The ImageMagick library is installed using the following command

sudo apt-get install php-imagick

But when I try image manipulation through this library, it throws the following exception

(1/1) NotSupportedException
ImageMagick module not available with this PHP installation.

How can I install this software with the latest PHP version?

Note: I am using Laravel 5.4 in this project.

like image 671
Muhammad Sipra Avatar asked Oct 19 '17 07:10

Muhammad Sipra


People also ask

How do I enable Imagick PHP?

To enable Imagick for your website, go to your Site Tools -> Dev -> PHP Manager. Click the PHP Extensions tab and find the entry for the “imagick” extension in the list that appears. Then click the Change value button (pencil icon), select the On radio button for Status and save the changes.

How do I add Imagick to PHP?

Install ImageMagick extension: Now install the ImageMagick PHP extension by using the following command. Install Imagick extension: After completion of ImageMagick package, the Imagick PHP extension will install. Restart Apache Server: Restart the apache server by using the following command.

How do I enable Imagick PHP extension in xampp?

Enable Imagick in php.ini file. Search for extension= and you will see lots of lines that start with this. Save the php. ini file, then restart XAMPP to apply the changes you made to the php.


1 Answers

You have to add extension=imagick.so in your php.ini file.

  • Location:

You can do some thing like this for the fastest way:

php -i | grep 'php.ini'

The result is like that:

Loaded Configuration File => /usr/local/lib/php.ini

Or call <?php phpinfo(); ?> from some php file to get this information :)

PS: Source

like image 188
Maraboc Avatar answered Oct 02 '22 05:10

Maraboc