Error Since Update on 4th-September-2019 HELP!!!

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Warrenfox002
Posts: 2
Joined: 2019-09-06T02:44:05-07:00
Authentication code: 1152

Error Since Update on 4th-September-2019 HELP!!!

Post by Warrenfox002 »

Good Morning IM

iam having an issuse on an shared cpanel with is error below it was working on the 3rd September and since update i get this.

Code: Select all

ImagickArray ( [imagick_exception] => ImagickException Object ( [message:protected] => Failed to read the file [string:Exception:private] => ImagickException: Failed to read the file in /home/debtcomp/services/signable/index.php:7 Stack trace: #0 /home/debtcomp/services/signable/index.php(7): Imagick->__construct('/home/debtcomp/...') #1 {main} [code:protected] => 1 [file:protected] => /home/debtcomp/services/signable/index.php [line:protected] => 7 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/debtcomp/services/signable/index.php [line] => 7 [function] => __construct [class] => Imagick [type] => -> [args] => Array ( [0] => /home/debtcomp/services/signable/signable_61892.pdf ) ) ) [previous:Exception:private] => ) )

My code is:

Code: Select all

$file = $_SERVER['DOCUMENT_ROOT']."/signable_61892.pdf"; // PDF is there allready 
$JPG =  $_SERVER['DOCUMENT_ROOT']."/signable_61892.jpg"; // get created once converted.
	try {
		if (file_exists($file)) {
			$im = new Imagick($file);
			$im->setResolution(300,300);
			$im->setCompressionQuality(70);
			$im->stripImage($file."[3]");
			$im->setImageAlphaChannel(1);
			$im->setImageFormat('jpg');
			$im->writeImage($JPG);
			$im->clear();
			$im->destroy();
			echo '<img src="'.$JPG.'"/>';
		}
	} catch( Exception $imagick_exception ) {
		file_put_contents(__DIR__."/error-log.log", compact( 'imagick_exception' ));
		print_r(compact( 'imagick_exception' ));
	}
and on of my clients VPS same thing but different server.

Code: Select all

Array ( [imagick_exception] => ImagickException Object ( [message:protected] => no decode delegate for this image format `/home/clientma/Clientmaster_CRM/v2/debtcompare-uk/app_files/tmp/signable_61892.pdf' @ error/constitute.c/ReadImage/544 [string:Exception:private] => ImagickException: no decode delegate for this image format `/home/clientma/Clientmaster_CRM/v2/debtcompare-uk/app_files/tmp/signable_61892.pdf' @ error/constitute.c/ReadImage/544 in /home/clientma/Clientmaster_CRM/v2/debtcompare-uk/test.php:7 Stack trace: #0 /home/clientma/Clientmaster_CRM/v2/debtcompare-uk/test.php(7): Imagick->__construct('/home/clientma/...') #1 {main} [code:protected] => 420 [file:protected] => /home/clientma/Clientmaster_CRM/v2/debtcompare-uk/test.php [line:protected] => 7 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/clientma/Clientmaster_CRM/v2/debtcompare-uk/test.php [line] => 7 [function] => __construct [class] => Imagick [type] => -> [args] => Array ( [0] => /home/clientma/Clientmaster_CRM/v2/debtcompare-uk/app_files/tmp/signable_61892.pdf ) ) ) [previous:Exception:private] => ) )
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error Since Update on 4th-September-2019 HELP!!!

Post by fmw42 »

Please always provide your ImageMagick version and platform when asking questions. Also which API you are using.
Warrenfox002
Posts: 2
Joined: 2019-09-06T02:44:05-07:00
Authentication code: 1152

Re: Error Since Update on 4th-September-2019 HELP!!!

Post by Warrenfox002 »

My VPS is using
imagick module version 3.4.4
ImageMagick 6.7.8-9 2019-06-11 Q16

and my shared hosting platform is using
imagick module version 3.4.4
ImageMagick 6.9.4-10 Q16 x86_64 2017-05-23

my hosting company cant get it working there said to come here to see any fixes
there running and VPS is cloudLinux witch both are had the update on 4th-September-2019

and Error From my Hosted website with same code from 1st post is

Code: Select all

ImagickArray ( [imagick_exception] => ImagickException Object ( [message:protected] => Failed to read the file [string:Exception:private] => ImagickException: Failed to read the file in /home/debtcomp/services.debtcompare.co.uk/signable/index.php:8 Stack trace: #0 /home/debtcomp/services.debtcompare.co.uk/signable/index.php(8): Imagick->__construct('/home/debtcomp/...') #1 {main} [code:protected] => 1 [file:protected] => /home/debtcomp/services.debtcompare.co.uk/signable/index.php [line:protected] => 8 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/debtcomp/services.debtcompare.co.uk/signable/index.php [line] => 8 [function] => __construct [class] => Imagick [type] => -> [args] => Array ( [0] => /home/debtcomp/services.debtcompare.co.uk/signable/signable_61892.pdf ) ) ) [previous:Exception:private] => ) )
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error Since Update on 4th-September-2019 HELP!!!

Post by snibgo »

This is an ImageMagick forum. You report errors from IMagick, which is a different product that provides an interface between PHP and ImageMagick. Perhaps IMagick documentation or a forum can help with those error messages.

I suggest you try the equivalent ImageMagick at the command line:

Code: Select all

convert signable_61892.pdf -density 300 -quality 70 signable_61892.jpg
If that doesn't work, post a link to your input PDF. If it does work, then there seems to be an IMagick problem.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error Since Update on 4th-September-2019 HELP!!!

Post by fmw42 »

Perhaps you need to install Ghostscript or if installed, Imagick cannot find it. That can happen and the delegates.xml file may need to have the full path to gs included.
Post Reply