Bug #81016 [NEW]: imagick throwing out âUncaught ImagickException: unable to open fileâ
| From: | a4992214 at gmail dot com | Date: | Thu, 06 May 2021 13:24:12 +0000 |
| Subject: | Bug #81016 [NEW]: imagick throwing out âUncaught ImagickException: unable to open fileâ | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-233717@lists.php.net to get a copy of this message | ||
From: a4992214 at gmail dot com
Operating system: Linux
PHP version: 7.3.28
Package: *Graphics related
Bug Type: Bug
Bug description:imagick throwing out âUncaught ImagickException: unable to open fileâ
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
--
Edit bug report at https://bugs.php.net/bug.php?id=81016&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81016&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81016&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81016&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81016&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81016&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81016&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81016&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81016&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81016&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81016&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81016&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81016&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81016&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81016&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81016&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81016&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81016&r=mysqlcfg