Getimagesize() - read error

2020-05-08 09:07发布

问题:

So I'm doing some maintenance on other people's legacy code, and I've fixed some basic permissions issues, however now in an image uploader, I'm getting the following error:

Warning: getimagesize() [function.getimagesize]: Read error! in /home/kirby/public_html/members/upload_advanced.php on line 211

Now, the permissions for that directory are set to allow read, execution and write - what would cause that issue? Could it be that the uploader isn't correctly writing the information?

回答1:

I've seen this before, and for me it was a memory issue, failing in the method:

_getNeedMemoryForFile

Probably the safest bet is to wrap to try-catch and handle the exception as gracefully as possible.



标签: php magento