I’m trying to allow users to upload large files (64MB) and am planning to change upload_max_filesize to 64MB.
However, should I also change memory_limit to 64MB or larger?
Is memory_limit connected to upload_max_filesize?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, it’s not necessary.
PHP has different POST readers and handlers depending on the content type of the request. In case of “multipart/form-data” (what is used for sending files),
rfc1867_post_handleracts as a mixed reader/handler. It populates both$_POSTand$_FILES. What goes into$_POSTcounts towards the memory limit, what goes into$_FILESalso counts.However,
$_FILEShas just meta-data about the files, not the files themselves. Those are just written into the disk and hence don’t count towards the memory limit.