Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Verify ImageMagick installation

My web hosting said ImageMagic has been pre-installed on the server. I did a quick search for "ImageMagick" in the output of phpinfo() and I found nothing. I can't SSH in the server so is there a way in PHP I can verify the installation?

like image 964
Desmond Liang Avatar asked Nov 17 '10 19:11

Desmond Liang


People also ask

Where is ImageMagick installed?

It is located at: /usr/bin/convert. /usr/bin/mogrify.

How do I know if PHP imagick is installed?

echo "Version return code is $rcode <br>"; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version" echo '<br>'; echo '<b>This should test for ImageMagick version 6.

How do I install ImageMagick?

Navigate to Home - Software - Module Installers, then click on the Manage button next to PHP Pecl. In the next screen, select the required PHP version, then click Apply. You can now enter “imagick” in the Install a PHP Pecl field, and click the Install Now button.

How do I enable ImageMagick?

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.


1 Answers

This is as short and sweet as it can get:

if (!extension_loaded('imagick'))     echo 'imagick not installed'; 
like image 149
bcosca Avatar answered Sep 28 '22 04:09

bcosca