# php file upload
I had one weird bug recently. I’ve made “LOVE” module for opencart which is working in http://www.mothereleganza.com. Basically this module is some sort of image gallery. So i’ve grabbed default opencart’s style to add images:
As you can see there are list of allready uploaded images, a file upload form fields and a remove buttons. So, If you hit Save button, you get uploaded new images, replaced old images if there are specified files and removed unneeded images. It looks like ease to use interface, but there is one bug: you have as many file uploads as files are uploaded. So after client added 20 images, all upload stuff stopped working. Why? Because PHP limits not only file size, but even a file count. In current server max_file_uploads option was set to 20. So it is possible to upload 20 files at once.
Fast decision was to remove file input fields from uploaded images. It will not be able to replace current image with a new one, but it is not necessary in my case.


