From my testing on PHP 5.2.0, here is a little information about these two ini settings:
Source: http://nigel.mcnie.name/blog/uploadmaxfilesizepostmaxsize-experimentation
See also: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
- upload_max_filesize refers to the size of the file (no surprise)
- post_max_size refers to the size of the post data - also no surprise, but this means the size of the post data not including any on-the-wire encoding.
- From 1 and 2, you can assume that post_max_size only needs to be a small amount bigger than upload_max_filesize for a file upload to work, even for large files [1]. BUT, if you need to upload more than one file on any given form, post_max_size will have to be more than double the size, and so on for more files.
- Despite what the php.net manual says, the uploaded files are NOT loaded into memory, and so it seems that memory_limit has no effect on whether you can or cannot upload files.
[1] | For a small form, post_max_size only needs to be about 2K bigger for the maximum sized file to be uploaded. Don't forget if you give people a textarea to write in as well they could go on and on and on and on and on and need a bigger limit. |
Source: http://nigel.mcnie.name/blog/uploadmaxfilesizepostmaxsize-experimentation
See also: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
No comments:
Post a Comment