Unable to upload images via PHP all of a sudden
Hi all,
I am getting a strange error in PHP (ea-php74) all of a sudden when attempting to upload a file:
ImagickException: unable to open file `/tmp/magick-32546Fb5hihS2N2mt': No such file or directory @ error/constitute.c/ReadImage/604 in /home/foobar/public_html/Image.php:25
I tried to search for this error but didn't have much luck. Any ideas how I can debug this please? I have updated Imagick to 3.5.0 via cPanel but no change.
Thanks kindly
-
Hey there! I searched for the "ImagickException: unable to open file" portion of the error, and all the replies I found pointed to permissions issues. Is /tmp set to 1777 permissions on the machine? It also might be worth reaching out to the provider of your script to see if they had additional ideas on the problem. 0 -
Thank you for the reply, @cPRex. I found similar results but none of it panned out, which is why I posted here. /tmp is set to drwxrwxrwt. Is that incorrect in any way? I wrote the code in question, which is why it's a little odd that it's happening all of a sudden as I haven't touched the code in awhile. 0 -
Nope, those are the correct permissions. I haven't seen anything odd related to Imagick or ImageMagick on my end recently, so if you wanted us to take a deeper look you're always welcome to submit a ticket to our support team. If you do that, please post the number here so I can make sure this thread stays updated with any details we find. 0 -
It may be related to the webp format. When I upload a jpg instead the code works fine. I'm not sure if this is a php or imagick or cpanel issue? 0 -
Thank you again. I checked that, but php74-php-gd is in fact installed. I can see in phpinfo() and GD and WebP are both enabled. That kind of leads me to wonder if it might be a cPanel issue? 0 -
Are you on a CentOS 7 machine? 0 -
Yes, 7.9kvm 0 -
I'd definitely submit a ticket then, as I'd expect all that to work. 0 -
Is there any customization to the current version? It's all being done through RPMs, so unless you have customized the current version I wouldn't expect anything to be different after the reinstall. 0 -
Customization to the current version of what specifically please? PHP? Imagick? This is one of the reasons why I went with cP - so I wouldn't have to do this kind of work anymore. :/ Inevitably I bugger something up. 0 -
I meant specifically imagick. Since it gets installed directly from the RPM with those steps, you'd have to make some pretty major changes in order to cause damage to it. 0
Please sign in to leave a comment.
Comments
13 comments