It's my first time to use WordPress using laravel forge. I already installed WordPress but the thing is when I upload a new theme .zip file, I notice that the upload is running but after that it says:
413 Request Entity Too Large
Tried also changing these lines below inside site FPM Configuration
memory_limit = 256M
pload_max_filesize = 50M
post_max_size = 60M
I think I need to set the filesize capacity on nginx but I don't know where it's lcoated . Any help would be much appreciated. Thanks!
Go to your server configuration > PHP options at Forge, there you will find option to increase max file upload size.
Hope this helps!
The issue is related to the nginx server's buffer memory. Try increasing the following parameter:
http {
client_max_body_size 20M;
}
You can do this in the server's nginx file in forge panel.
Related
I am uploading a file In Laravel. If I upload a file of 2 MB then it is working, but If I upload a file of 10 MB it is not working. If I check php.ini it shows max_post_size 1024 MB and max_file_upload 1024 MB.
It is working fine on local. I am using centos and nginx server.
Probably you should change your php configuration file to allow receipt of bigger files. See the accepted answer to the question "Change the maximum upload file size"
Update: "By default, Nginx has a limit of 1MB on file uploads. To set file upload size, you can use the client_max_body_size directive, which is part of Nginx’s ngx_http_core_module module. This directive can be set in the http, server or location context."
For details see https://www.tecmint.com/limit-file-upload-size-in-nginx/
Do you after changing max_post_size and max_file_upload restart nginx service?
Maybe in error log you saw the answer:
/var/log/nginx/nginx_error.log
I'm using Godaddy linux share hosting, and using the php.ini to configure the file upload max size
file_uploads = On
post_max_size = 100M
upload_max_filesize = 100M
but this is not working, the max filesize that allow is 2mb, although i configure already, i have tried the "php5.ini", "php56.ini" and store it in "/public_html/" or "root" folder, it still not working, at first i suspect it is the problem of SSL, because i just install SSL 2 weeks ago, but i found that my another hosting account(no SSL installed) that i configured before and tested before and show it is working correctly also have same problem,
Can i know what problem? is it only me encounter the this problem? and how to fix it?
I found the answer, we can straight away change the max upload size in system, follow this tutorial, https://www.youtube.com/watch?v=YmS92xfmbFU
I am using a server hosted by GoDaddy, But when I post data of size greater than 1MB it returns a 413 "Request Entity Too Large" response. I cannot find the httpd.conf file and cannot affect the .htaccess changes. How can I increase the LimitRequestBody to 50MB.
I am using shared hosting.
Here's a screenshot of the response I get:
If you are having shared hosting plan with godaddy, as of right now, I just tested, maximum LimitRequestBody have to be set at 500kb.
Seems like used to be 1MB.
And, based on what I googled, you need to move to the dedicated server in order to modify these settings.
I would say the problem lies in your php configuration. There are two settings for file size limitation:
upload_max_filesize = 10M
post_max_size = 10M
These settings are normally found in the php.ini file. Since I have no experience with your kind of hosting I would not know if you can change it, but if you have access to the php.ini or have some other means of overriding php settings you can follow this post on StackOverflow on how to do this.
By running phpinfo you can at least find out what the current settings are and see if this is causing the issue.
Here is how to increase the file size limit in your PHP.ini file: https://support.godaddy.com/help/article/1409/increasing-user-file-upload-limits-using-php-ini-on-your-linux-server
I have been getting this 413 response when trying to upload an ~20MB zip file with a home grown (but not by me) document library resource developed in PHP running on an Apache server with a MySQL database connected. Normally the max file size is limited to 5.2MB in a local PHP variable. So the first thing I did was to increase this value and try to upload the file. That's the first time I encountered this error.
I tried everything mentioned here: Request Entity Too Large
And even changed the mod_security config settings mentioned in the bottom of that post. Even with all the limits I found raised far above what I should need -- up to ~120MB, I still get this error.
This worked fine for me maybe this helps you to upload larger files:
Change these values in php.ini:
upload_max_filesize 3000M
post_max_size 3000M
max_execution_time 3600
max_input_time 3600
So after posting this, I found another mod_security limit that needed to be raised appropriately.
SecRequestBodyLimit was too low (131072).
This is probably a corner case, but hope it helps someone else.
Do you increase LimitRequestBody in your apache config? Link to LimitRequestBody in Apache Documentation
None of the listed fixed my problem. They were all set much higher than needed. I was posting 100k-500k textarea fields. What did fix it for me was adding the following to the <form> tag.
enctype="multipart/form-data"
When trying to upload images into WordPress, I keep getting this error:
413 Request Entity Too Large
nginx
I checked PHP.ini file to make sure I have the proper upload-able amount and I have 32mb
I have a dedicated server with Media Temple and have never had this issue before. Hope someone could shed some light?
The file sizes I am uploading are about 1 - 3 mb. Anything less than 1mb seems to go through.
This is not a php.ini issue. The error is coming from the web server nginx.
Add this line somewhere in your nginx server block (change 5M to whatever you need):
client_max_body_size 5M;
Try the following in your php.ini file and then restart the server. Restarting the server is key.
memory_limit 20MB
post_max_size 20MB
upload_max_filesize 20MB
max_execution_time 600