IMagick Update -> Script Error
Posted: 2009-08-13T13:42:36-07:00
Hello,
i am new here and im from austria. I'm not the best with speaking english 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
A small part of my code...
I have the code NOT changed, before the update have it all works! Now i have a Problem in line 61 there stand:
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!
i am new here and im from austria. I'm not the best with speaking english 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
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");
Code: Select all
$images = new Imagick("$uploads_dir/$ID-$name");