|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-05-06 14:36 UTC] cmb@php.net
-Package: *Graphics related
+Package: imagick
[2021-06-11 16:19 UTC] danack@php.net
-Status: Open
+Status: Feedback
[2021-06-11 16:19 UTC] danack@php.net
[2021-06-20 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 22:00:01 2025 UTC |
Description: ------------ running the line $fn = '/var/www/vhosts/.........../myfile.png'; $im = new imagick($fn); // where myfile.png exists and can be viewed if run directly from the browser but I get the following error: Uncaught ImagickException: unable to open file `/tmp/magick-5465d-r7LT2tZ8Ip': No such file or directory @ error/constitute.c/ReadImage/604 in .... When I run the same code on a different server, it works! When I run against another test file it works ok. If it is something about myfile.png that is causing this problem then improved error messages should be given Test script: --------------- <?php $fn = 'https://www.methodfish.com/images/crop2493_1.png'; $im = new Imagick(); $im->readImage($fn); // <------ it blows up here (line 6) // Display the image header("Content-Type: image/png"); echo $im->getImageBlob(); Expected result: ---------------- I would hope to see the https://www.methodfish.com/images/crop2493_1.png image on the screen Actual result: -------------- Fatal error: Uncaught ImagickException: unable to open file `/var/www/vhosts/......./tmp/magick-19229B77I2QMCe1Z2': No such file or directory @ error/constitute.c/ReadImage/604 in /var/www/vhosts/..../test.php:6 Stack trace: #0 /var/www/vhosts/......./test.php(6): Imagick->readimage('https://www.met...') #1 {main} thrown in /var/www/vhosts/...../test.php on line 6