Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: Class 'imagick' not found

I am trying to install imagemagic php extension under WampServer 2.

  • I've downloaded and installed ImageMagick . I've chosen ImageMagick-6.8.8-10-Q16-x86-dll.exe

  • I've downloaded the php extension.

  • I've moved the dll extension I just downloaded to C:\wamp\bin\php\php5.4.16\ext\

  • I've altered php.ini (accessed it through wamp tray icon > right-click > PHP > php.ini) and added "extension=php_imagick.dll", without the quotes, to the extensions lists.

  • I restarted Apache. Not noticing the extension displayed on the PHP extensions list from the tray icon, I restarted the wampserver. ImageMagick extensions now shows enabled on the list.

However, I cannot use it. Doing a quick test returns "Fatal error: Class 'Imagick' not found". In the phpinfo() shows only that the imagemagick has been added to env variables.

when I try to test the imagick :

$im = new imagick( 'test.jpg' ); // resize by 200 width and keep the ratio $im->thumbnailImage( 200, 0);  // write to disk $im->writeImage( 'test_thumbnail.jpg' ); 

I get the error:Fatal error: Class 'imagick' not found What am I doing wrong? I'm working with win7 32 bit, phph 5-4-16 and apache2

like image 783
Dev DOS Avatar asked Apr 12 '14 04:04

Dev DOS


People also ask

How do I enable imagick 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.

How do I install imagick?

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.


1 Answers

  • Try: php -m | grep imagick.
  • If the result is empty do: sudo apt-get remove --purge php5-imagick && sudo apt-get install php5-imagick

Regards

like image 130
Amadu Bah Avatar answered Sep 24 '22 04:09

Amadu Bah