WebLeaps

570.629.6980

facebook twitter


Image Upload Error No such file or directory

Wednesday, April 19th, 2017

Have you ever seen this error while doing a file upload? Warning: getimagesize(images_sm/image.png) [function.getimagesize]: failed to open stream: No such file or directory in /home/file.php on line 70

This error is typically associated with a permissions error on the folder(s) that you are trying to upload the image into.  Namely that you haven’t allowed enough access to be able to upload images into these folders.

So if you’ve tried to adjust permissions and are still hitting your head on the wall, do a quick code check.  If you recently moved servers/had a server upgrade these issues can sometimes be due to deprecated code.  In this case the file upload code was using

$HTTP_POST_FILES which is deprecated

Doing a quick update from $HTTP_POST_FILES to $_FILES will fix the error and have you uploading files once again in minutes!

Leave a Reply

facebook

570.629.6980