Hello again folks! Back so soon, you ask? Yes, yes, well.. we thought a few of you might want to upload images again.
Many of you reported issues with uploading images.. no error message, everything looked fine, but the image just didn’t upload. But then, most of you had no problems at all.
It turns out that a security setting was added to PHP versions 5.2.12 and later called max_file_uploads. This setting is defaulted to 20, to guard against bots attempting to overload the server with uploads.
Ok, well, we’re only uploading 1 file at a time, right? So, no problem. Right?
Wrong.
PHP counts empty file upload fields as uploads. This means on servers with default PHP settings, a web app cannot allow more that 20 file input fields in one form. We have a few more than that.
Fortunately, my years of rigorous Google Fu training placed me at this blog post by a similarly frustrated Drew McLellan. He offered up a nifty jQuery-based workaround that keeps any empty file input fields from getting to the PHP side by disabling them.
Thank you so much, Drew. Now I can enjoy my birthday.




4 Comments
Woah! I’m really loving the template/theme of this blog. It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between usability and visual appearance. I must say that you’ve done a fantastic job with this. Additionally, the blog loads super quick for me on Firefox. Exceptional Blog!
Testing Comments!
Happy Birthday old fart!!
Thanks Alison!