Skip to main content

Unable to upload images via PHP all of a sudden

Comments

13 comments

  • cPRex Jurassic Moderator
    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
  • 4pples
    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
  • cPRex Jurassic Moderator
    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
  • 4pples
    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
  • cPRex Jurassic Moderator
    If it is related to WebP, this might be helpful:
    0
  • 4pples
    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
  • cPRex Jurassic Moderator
    Are you on a CentOS 7 machine?
    0
  • 4pples
    Yes, 7.9kvm
    0
  • cPRex Jurassic Moderator
    I'd definitely submit a ticket then, as I'd expect all that to work.
    0
  • 4pples
    Thanks again. I went through the process and was auto-suggested this how-to:
    0
  • cPRex Jurassic Moderator
    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
  • 4pples
    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
  • cPRex Jurassic Moderator
    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.