If you increased upload_max_filesize
in php.ini, you also need to increase post_max_size
for example:
upload_max_filesize = 256M ;
post_max_size = 256M ;
yes. I actually put post_max_size also. Still the same problem.
In that case then, I recommend contacting your hosting provider. PHP has been directed to accept a file of that size, but something in your server configuration is still rejecting it as too large.
I fix the problem. It was a cloudflare issue. They have an upload limit of 100mb. I just turn off cloudflare on my site instead of just disabling the page cache.
Thanks for sharing your solution!
Nginx configuration:
# vi /etc/nginx/nginx.conf
OR
# vi /usr/local/nginx/conf/nginx.conf
Add the following line to http or server or location context to increase the size limit in nginx.conf, enter:
# set client body size to 256M #
client_max_body_size 256M;
Save and close the file. Reload the nginx webserver, enter:
# /usr/local/nginx/sbin/nginx -s reload
OR
# /sbin/nginx -s reload
OR use the following on RHEL/CentOS/Debian/Ubuntu Linux:
# service nginx reload
PHP configuration (optional):
Edit php.ini and set the following directives
;This sets the maximum amount of memory in bytes that a script is allowed to allocate
memory_limit = 256M
;The maximum size of an uploaded file.
upload_max_filesize = 256M
Save and close the file. Make sure you reload/restart back-end apache or nginx web server as per your setup.
-
This reply was modified 8 years, 7 months ago by
Nanhe Kumar. Reason: formating
You can check the methods and the solutions at here: How to fix and solve Error 413 code problem
I have a file size 16MB, but when i upload keep getting “413 Request Entity Too Large”?