I know this was asked some time ago, but the answer is still relevant, and not actually in this post.
Original poster noted:
Notice: Your 'upload_max_filesize' config setting limits the maximum filesize to '2097152'. You tried to set '10485760' in /location/to/Zend/Form/Element/File.php on line 620
and in the following note:
I failed to get this to work: ini_set ('post_max_size', 10485760)
Technically, the setMaxFileSize () class method does the same as ini_set.
Which is mostly undocumented, but it applies that you can change this value to whatever you want, which does not exceed the value in php.ini that is read at startup.
For example, * nix defaults to 2M. If you have not changed php.ini, you can only overwrite this value with a number from 0 to 2097152.
One last note. As mentioned in a Pascal MARTIN post, he mentioned that upload_max_filesize and post_max_size go hand in hand. Something else to consider is that if you make these values a little larger, you probably want to make sure that your memory_limit value is also considered, since you script will crash due to memory exhaustion.
conrad10781
source share