skip to Main Content

I have a project to make a Miiverse clone in 24 hours
and i have a problem when i want to sign in
the problem is related to images (i think)
here is the code i use :

$imagick = new Imagick(realpath($filename));

    $format = $imagick->getImageFormat();
    if ($format == 'GIF') {
        $imagick = $imagick->coalesceImages();
        do {
            $imagick->scaleImage($width, $height);
        } while ($imagick->nextImage());
        $imagick = $imagick->deconstructImages();
    } else {
        $imagick->scaleImage($width, $height);
    }

    $resized = $imagick->getImagesBlob();
}

$get_keys = $dbc->prepare('SELECT * FROM cloudinary_keys ORDER BY RAND() LIMIT 1');
$get_keys->execute();
$key_result = $get_keys->get_result();
$keys = $key_result->fetch_assoc();

Please help me i started PHP a few months ago
Thanks for responding !
Aymo

I tried to remove the problem line but i caused more errors and i expected to repair the problem

2

Answers


  1. I am just reiterating what user3783243 says above. If you install the module that error will go away.

    see https://www.php.net/manual/en/book.imagick.php

    Login or Signup to reply.
  2. Try doing this:

    pecl install imagick
    

    If you don’t have pecl, you need to tell us your operating system and/or Linux distribution.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search