• I am trying use a plugin that requires the ImageMagick PHP extension is installed. I receive this message when trying to upload a photo to my post: Fatal error: Class ‘Imagick’ not found in /home/userdirectory/public_html/blog/wp-content/plugins/article-photo/article-photo.php on line 119

    I checked with my host and there response was:

    image magik is currently installed and the binaries are accessible from
    /usr/bin/local as such you may need to ensure your PATH variable is set
    correctly and that you are invoking the correct domain name to work with a photo plugin that require that Image:Magik

    I am not that savvy with what is required here.

    Any assistance would be greatly appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I have the same problem. Image magic is installed and works on my webspace. Only article-photo complains that it’s missing.

    Your host is giving you incorrect details. Although ImageMagick itself may be installed, the plugin depends on the ImageMagick PHP extension: http://uk3.php.net/manual/en/book.imagick.php.

    I get the same error as above:
    Fatal error: Class ‘Imagick’ not found in /home/userdirectory/public_html/blog/wp-content/plugins/article-photo/article-photo.php on line 119

    on contacting my hosting provider they stated it is installed. but as of today got another email from this saying:

    The function your trying to use Imagick is not installed on our servers:

    http://pecl.php.net/package/imagick

    Is what would need to be installed and it states:

    This extension requires ImageMagick version 6.2.4+ and we only have ImageMagick: 6.0.7 so we wouldn’t be able to install that extension.

    So what are my options?

    So a lot of providers might have an older version installed.

    6.2.4 is over 4 years old, 6.0.5 is over 5 years old! I can’t think of any reason for a decent host would run such out of date software.

    With regards to the plugin, it does heavily depend on ImageMagick (for obvious reasons), so there’s not really much you can do unless you want to change for a better provider.

    How do I get the Image Magick PHP extension? How do I know if it’s installed? I’d like to try the Article Photos plugin (so that “contributor” level users can upload photos with their posts) but I’m stuck on the Image Magick thing. Thanks!

    How do I get the Image Magick PHP extension?

    Sorry for the delay in replying.

    If you run your own server, it’s simply a matter of installing Imagick (maybe something like “pecl install imagick”, or “yum install php-pecl-Imagick”), but if you’re on a shared host, you’ll have to ask your host to install Image Magick and the PHP extension for it. Any decent host should comply if they don’t have it installed already. It’s pretty common (but not everywhere as I thought, hence the replies in this thread!)

    if you cant get the image magick extension but you do have imagemagick you can try to replace it with this function:

    function get_the_article_photo($size)
    {
    	global $post;
    	$rawurl = get_post_meta($post->ID, '_articlephoto_url', true);
    	$rawfile = get_post_meta($post->ID, '_articlephoto_filename', true);
    
    	if ($rawurl == '')
    	{
    		return FALSE;
    	}
    
    	list($imageWidth, $imageHeight) = getimagesize($rawfile);
    
    	if ($size == 0 || $size >= $imageWidth)
    	{
    		return $rawurl;
    	}
    	if (file_exists($rawfile . '-' . $size))
    	{
    		return $rawurl . '-' . $size;
    	}
    	system('convert ' . $rawfile . ' -auto-orient -thumbnail ' . $size . 'x' . $size . ' -unsharp 0x.5 ' . $rawfile . '-' . $size);    
    
    	return $rawurl . '-' . $size;
    }

    Thank you very much! (sorry my bad englisH)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Class ‘Imagick’ not found – How to set the path’ is closed to new replies.