Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class 'Imagick' not found

Tags:

php

xampp

imagick

i try to use imagick, and i get this error:

Fatal error: Class 'Imagick' not found in C:\xampp\htdocs\site\replace.php on line 6

so i google it, and i found this tutorial: http://www.zoharbabin.com/5-steps-to-get-imagemagick-on-xampp-1-7-3/ that says:

1.Install the LATEST OFFICIAL version of ImageMagick from LINK . (I first tried installing the one from LINK specified in the post above, didn’t work here as it’s missing a required DLL). Download the Win32 dynamic at 16 bits-per-pixel version. Make sure it’s installed in a simple non spaces folder name, e.g. C:\imagemagick . During installation, make sure you check the box for “Add application directory to your system path” (otherwise make sure to do this manually).

2.Download the following DLL – php_imagick.dll courtesy of LINK (original link). Place this file into your php\ext folder inside xampp, e.g. C:\xampp\php\ext .

3.Edit php.ini (C:\xampp\php\php.ini) and add the following line: extension=php_imagick.dll 4.RESTART windows.

and i did this, but i get the next error when i try to run apache: (the error is tanslated from another lang...)

{do not found an enter point} there was not option to locate the enter point php_checkuid_ex of the procces in dynamic libary link php5ts.dll

ans i steel getting the error:

Class 'imageick' not found

pleae help!

like image 721
Kaki Baleven Avatar asked Aug 05 '26 04:08

Kaki Baleven


1 Answers

Confirm where your php.ini file is by looking for "Loaded Configuration File" in phpinfo()

Open that php.ini file exactly where it is located (occasionally its in the WINDOWS directory instead of xampp - phpinfo will tell you this), confirm extension=php_imagick.dll is there and uncommented.

If you still get an error message when you restart apache, it most likely means you have mismatching versions. Confirm you have XAMPP 1.7.3 and it still doesn't work, you'll have to do it the hard way.

You should know your PHP version (e.g. 5.4, 5.6) and if it's thread safe or not (that is the "ts" stands for threadsafe in the php5ts.dll).

Get the dll from the official site (https://pecl.php.net/package/imagick) and copy all the dlls to the php ext directory (you might have to also copy them to the apache directory)

On top of this you have to have image magick 6.8 installed (NOT the most recent version) because the php extension library isn't yet compatible with the newest version (6.9). 6.8 binaries aren't offered officially: i'm sure you can find it on google though. you will probably have to set the MAGICK_HOME envriomental to the correct image magick installdir else your image magick won't support any file types.

like image 123
Pibb Avatar answered Aug 06 '26 17:08

Pibb