PHP upload size and its impact on post size and memory limit

后端 未结 2 1419
南旧
南旧 2020-12-03 21:50

My PHP web application requires files (about 2.5 to 3 GB in size) to be uploaded to the server. How will this impact on following directives ?

what are the required

相关标签:
2条回答
  • 2020-12-03 22:31

    Your values should be the maximum size of the file you want to upload. So if you want 3GB, then each of those values should be 3072M (3GB in MB).

    0 讨论(0)
  • 2020-12-03 22:55
    1. post_max_size should be 3G

    2. upload_max_filesize should be 3G

    3. memory_limit depends!!! what you are going to do with the file. If you are going to manipulate the file or do other memory intensive jobs, then you will need to set a high limit. If you don't want to put a maximum limit, you can always set it to -1. This value doesn't have to do much with the size of the file, but rather with the size of the physical memory your script needs to handle the job.

    For the first two, it is the maximum file size you expect to be uploaded, suffixed with a short hand byte value. For KB should be K, MB should be M, GB should be G, ...

    0 讨论(0)
提交回复
热议问题