baffled_in_UK wrote:My understanding of ini_set is that it will keep this new value during the script's execution?
Yes, but that's not the problem. PHP will already have received the file but then discarded it due to size restrictions before it parses and executes your script. So you're only changing the size restriction after the file has already been processed and analyzed (and, in this case, deleted) by PHP - not very helpful.
baffled_in_UK wrote:I have seen several instances in other posts where people have needed to change the max_upload_size and this is the method given to do it.
Care to provide a link (or links) to such posts?
EDIT: Even if you don't believe me (BLASPHEMY! :p), take it from the manual; visit the [man]ini.list[/man] page and look up the max_input_time, post_max_size, and upload_max_filesize PHP directives. All have a 'configurable' value of PHP_INI_PERDIR which, as explained by this page: [man]configuration.changes.modes[/man], means:
PHP Manual wrote:Entry can be set in php.ini, .htaccess or httpd.conf
Note that [man]ini_set/man (or anything else you can do inside a PHP script) doesn't appear in that list of options.