Page 1 of 1

IMagick Update -> Script Error

Posted: 2009-08-13T13:42:36-07:00
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!

Re: IMagick Update -> Script Error

Posted: 2009-08-24T14:10:33-07:00
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.