Page 1 of 1

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

Posted: 2019-09-06T02:50:30-07:00
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] => ) )

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

Posted: 2019-09-06T11:24:45-07:00
by fmw42
Please always provide your ImageMagick version and platform when asking questions. Also which API you are using.

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

Posted: 2019-09-07T06:35:54-07:00
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] => ) )

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

Posted: 2019-09-07T08:14:01-07:00
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.

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

Posted: 2019-09-07T10:41:29-07:00
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.