Issue with ImageMagick and PHP -


im struggling simple reading image in imagemagick , not sure why

the website hosted under linux php version 5.4

after uploading image in order print it.

$image = $_files['file']['name']; $imagen = new imagick($image); $imagen->thumbnailimage(100, 0); echo $image; 

(pub1.gif) it's name of original image uploaded

but i'm getting following error , no idea how handle it.

fatal error: uncaught exception 'imagickexception' message 'unable open image `pub1.gif': no such file or directory @ blob.c/openblob/2480' in /home/content/38/10882038/html/carsventa/accountpass/post/publish-advertisement.php:74stack trace:#0 /home/content/38/10882038/html/carsventa/accountpass/post/publish-advertisement.php(74): imagick->__construct('pub1.gif')#1 {main} thrown in /home/content/38/10882038/html/carsventa/accountpass/post/publish-advertisement.php on line 74

you should using:

$image = $_files['file']['tmp_name']; 

instead of:

$image = $_files['file']['name']; 

you're trying use client file, not located in server, therefore library cannot access properly.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -