IMagick Update -> Script Error

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
AXELB

IMagick Update -> Script Error

Post by AXELB »

Hello,

i am new here and im from austria. I'm not the best with speaking english :oops: i have looked very many hours by google ive not found the Solution.

I have updated my Linux System and now i beome an error on my homepage

Code: Select all

Fatal error: Uncaught exception 'ImagickException' with message 'Wand contains no images `MagickWand-2'' in /var/www/vhosts/heidtec-gaming.de/httpdocs/functions/userpic.php:61 Stack trace: #0 /var/www/vhosts/heidtec-gaming.de/httpdocs/functions/userpic.php(61): Imagick->__construct('./images/userpi...') #1 /var/www/vhosts/heidtec-gaming.de/httpdocs/index.php(223): include('/var/www/vhosts...') #2 {main} thrown in /var/www/vhosts/heidtec-gaming.de/httpdocs/functions/userpic.php on line 61
A small part of my code...

Code: Select all

	$uploads_dir = './images/userpics';

	$tmp_name = $_FILES["bild"]["tmp_name"];
	$name = $_FILES["bild"]["name"];

	if(move_uploaded_file($tmp_name, "$uploads_dir/$ID-$name") == false) {
	echo "Es ist ein Fehler beim Hochladen aufgetreten, bitte kontaktieren Sie einen der Admins.";
	echo '<meta http-equiv="refresh" content="1; URL=index.php?section=settings">';
	}
	else
	{
	$images = new Imagick("$uploads_dir/$ID-$name");
	$images->thumbnailImage(180, 240); 

	$fp = new Imagick();
	$fp->setResolution( 180, 240); 
	$fp->addImage ($images);
	unlink("$uploads_dir/$ID-$name"); 
	$fp->writeImage("$uploads_dir/$ID-$name");

	$fps = new ImagickDraw();
	$fps = new Imagick("$uploads_dir/$ID-$name");
	$fps->thumbnailImage(100, 133); 
	$fps->writeImage("$uploads_dir/small-$ID-$name");
I have the code NOT changed, before the update have it all works! Now i have a Problem in line 61 there stand:

Code: Select all

$images = new Imagick("$uploads_dir/$ID-$name");
The Variables $uploads_dir/$ID-$name are 100% correct, this script is more than a year old and worked everyday super :) Where is the Problem i hope anybody can help me, thanks!
AXELB

Re: IMagick Update -> Script Error

Post by AXELB »

Thx for help

/ Edit: It is now running again, if anyone wants to know how I managed it so leave me a message. I will not surrender, therefore, the solution here would help me any. I do not think it's ok, though thanks again.
Post Reply