please ignore the values above, but they enable me to allow uploads of around 150-200M. memory_limit, post_max_size and upload_max_filesize have some specific ratios between each other. i believe that

upload_max_filesize < post_max_size < memory_limit

however, i dont' know how to calculate exact sizes. for example what must be values of these settings in order to allow exactly 100M file upload? from what i gathered online, there is number of factors that determine these ratios, but i couldn't find any references what are these factors.

1 Answer
1

The memory limit is independent of the POST size you upload files. The uploaded files will be parsed directly by PHP and put in a temp folder.

The upload_max_filesize must be 100M and your post_max_size must be 100M + the overhead of the multipart encoding. The overhead is low as it is binary encoded with a boundary. Even with 101MB it will work.

Now, it may still crash your script if you then do $file = file_get_contents('path/to/uploaded/file.ext'); because in this case the memory_limit will kick in.