Quantcast
Channel: Imagick successfull installation but error occurs: Uncaught Error: Class 'imagick' not found - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Imagick successfull installation but error occurs: Uncaught Error: Class 'imagick' not found

$
0
0

I've read a dozen of articles, but none provides a proper solution. I have an SSH access to my server and I installed the imagick through composer as follows:

composer require calcinai/php-imagick

The library successfully installed on both my local server (open server) and on the remote server. Then I do:

$imagick = new imagick();$imagick->setResolution(300, 300); 

Everything works fine on my local machine, but on my web-hosting it returns Uncaught Error: Class 'imagick' not found. Do I need to do the require for all the files or something? Because I tried to add the following in the beginning:

require_once $_SERVER['DOCUMENT_ROOT'].'/vendor/autoload.php';require_once $_SERVER['DOCUMENT_ROOT'].'/vendor/calcinai/php-imagick/src/Imagick.php';

now it throws me this: Uncaught Exception: Imagick::setResolution not implemented

Please, advice.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>