PHP imagick not working for a certain photo
There is a large .jpeg photo that one of 开发者_StackOverflowthe users on my site is unable to upload.
I tried to share the photo here, but it took 5+ minutes to get uploaded and still didn't upload so I had to cancel the upload.
Here is a link to the photo online
http://www.comehike.com/img/member_photo/30/DSCN0175.JPG
But when imagick tried to process it, the page was just hanging and eventually reached the end of max request time and just became a white page. I even increased the request time to 500 seconds, and it still didn't work.
Your image is just too big. You can limit the max size of the upload by getting the size with $_FILES['field_name']['size']
and reject the upload.
I think PHP's upload_max_filesize
default is just 2M. Try to increase upload_max_filesize
in php.ini. It's probably also necessary to increase post_max_size
to the same or larger value accordingly.
精彩评论