Error Since Update on 4th-September-2019 HELP!!!
Posted: 2019-09-06T02:50:30-07:00
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.
My code is:
and on of my clients VPS same thing but different server.
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' ));
}
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] => ) )