413 Request Entity Too Large In Joomla 3.3 - php

Hello all i'm getting this error when I'm posting new articles of 4500 lines it says
Request Entity Too Large
The requested resource /administrator/index.php does not allow request
data with GET requests, or the amount of data provided in the
request exceeds the capacity limit. Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle
the request.
I did change in php.ini with but still same error
max_input_time = 24000
max_execution_time = 24000
upload_max_filesize = 12000M
post_max_size = 30000M
memory_limit = 12000M
it runs on Joomla! 3.3.6 Stable [ Ember ]

Set following line in nginx configuration file (nginx.conf) if your joomla portal is on nginx server:
client_max_body_size 100M;
Restart nginx and now plugin installation will work.
Thanks

As #Kevin noted this is a configuration issue with your web server. If you're using Apache the configuration you want to modify is LimitRequestBody.
If using nginx the directive is client_max_body_size

Related

PHP AWS Elastic Beanstalk - Cannot post file more than 2GB

I have deployed an application in Elastic Beanstalk, changed some configuration so that I can upload larger files and restart nginx server.
When I upload one file less than 2 GB, it is uploaded successfully. However, when I upload a file more than 2 GB, it does not upload successfully. Below are the lines that I have added in /etc/nginx/nginx.conf file:
client_max_body_size 7500M;
proxy_connect_timeout 1200s;
proxy_send_timeout 1200s;
proxy_read_timeout 1200s;
fastcgi_send_timeout 1200s;
fastcgi_read_timeout 1200s;
Also, I have added config file in .ebextensions and put in the following content:
files:
"/etc/php.d/99uploadsize.ini":
mode: "000644"
owner: root
group: root
content: |
post_max_size = 5000M
upload_max_filesize = 5000M
memory_limit = 5000M
commands:
remove_old_ini:
command: "rm -f /etc/php.d/99uploadsize.ini.bak"
and also tried the following content:
files:
"/etc/nginx/conf.d/proxy.conf":
mode: "000755"
owner: root
group: root
content: |
post_max_size = 7500M
upload_max_filesize = 5000M
memory_limit = 7500M
client_max_body_size = 5000M
Here is the phpinfo() snapshot:
Where am I going wrong? Kindly assist me
PHP Settings
Your PHP Settings are absolute correct are there is no error is the settings.
Uploading Error Not PHP
As per you picture posted the Error Code i.e. 7 which means
UPLOAD_ERR_CANT_WRITE - 7; Failed to write file to disk. Introduced in PHP 5.1.0
It means you uploading code is correct but at the time of writing the file on the system it is failed.
Apache Settings
LimitRequestBody
This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.
The LimitRequestBody directive allows the user to set a limit on the allowed size of an HTTP request message body within the context in which the directive is given (server, per-directory, per-file or per-location). If the client request exceeds that limit, the server will return an error response instead of servicing the request. The size of a normal request message body will vary greatly depending on the nature of the resource and the methods allowed on that resource. CGI scripts typically use the message body for retrieving form information. Implementations of the PUT method will require a value at least as large as any representation that the server wishes to accept for that resource.
This directive gives the server administrator greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks.
Solution:
You cannot post/upload the file through PHP more than 2 GB as Apache server will not let it do it.
The Only solution through is that you can zip it and while doing zip split the file less then 2 GB per file and then unzip them, to server which each request.
Run the script to unzip the file and do things.

500 server error on uploading files more that specific size on php when php.ini conf is correct

I have this PHP configuration:
ini_get('max_execution_time') = 3000
ini_get('memory_limit') = 256
ini_get('post_max_size') = 200M
ini_get('upload_max_filesize') = 200M
On this environment:
CentOS 7 server
CentOS Web Panel
Apache web server 2.4
PHP 7.2
Laravel framework 7.0
And when I try to upload files more than 1MB I get a 500 internal server error!
This is the error in network tab:
Other info about request:
I tried everything that I had in mind like setting ini in controller changing the sending file method from ajax to simple form, etc... but no luck!
I also restarted the httpd service even restarted the server so maybe the changes make affect but nothing changes
Edit:
I also see this error in apache logs:
Handler for (null) returned invalid result code 70007
After a lot of researches and tries I found the problem and in doesn't make sense at all!
As in this link said:
7007 apache error
I had to just disable this line:
LoadModule reqtimeout_module modules / mod_reqtimeout.so
From Apache httpd.conf file

Nginx, PHP and centos7 error 413-request-entity-too-large when connect to different network

My web system (Laravel) had 2 domain which company.test.hero (which can only be access by my company network) and example.com (which point to company.test.hero and can be access by public)
The problem is when I want to upload file, if I connect to my company network I can upload file without problem.
But if I connect with other network, it will give Error 413-request-entity-too-large (I try to upload file size 2.86mb).
I already setting NGINX upload limit in folder etc>nginx>nginx.conf
client_max_body_size 20M;
I also had set etc>php.ini upload limit.
upload_max_filesize = 20M
memory_limit = 256M
post_max_size 20M
Edit your NGiNX configuration file (usually /etc/nginx/nginx.conf) and add this line into the http section:
http {
client_max_body_size 100M;
}
Note: Don't use MB, use only M or it will not work!
Also do not forget to restart nginx:
systemctl restart nginx

nginx 413 request entity too large when up[loading more than 1Mb file

I am trying to post a file bigger than 1 mb and i get this Nginx error.
I have changed client_max_body_size 500M in nginx.conf and post_max_size=500M
upload_max_filesize=500M in php.ini.
Try restart/reload both nginx and PHP to load the new configuration.

php upload and internal server error

i am using an html form with php to upload data to mysql.
the form is working properly when i am using it on my laptop (wamp) but when i uploaded the site on my dedicated server (ispconfig) get this error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
i tried changing the values of the php.ini in
post_max_size 64M
upload_max_filesize 64M
max_input_time 3000
max_execution_time 3000
and the ones in the apache also in
memory_limit 96M
post_max_size 64M
upload_max_filesize 64M
but i still cant upload.
thank you for reading this.
You need to increase FcgidMaxRequestLen in httpd.conf file
use something like
FcgidMaxRequestLen 67108864
From FcgidMaxRequestLen Directive
Warning
Before 2.3.6, this defaulted to 1GB. Most users of earlier versions
should use this directive to set a more reasonable limit.
The accepted answer is correct. To be more specific, you need to add the code in httpd.conf file :
# Work around annoying fcgid limitations
<IfModule mod_fcgid.c>
# 20MB should be enough
MaxRequestLen 20000000
</IfModule>
You may check the full article here :
http://pivica.me/blog/500-internal-server-error-while-uploading-files-bigger-then-100kb-modfcgid-problem
Note that a syntax error in a php/ajax processing script could report as an "internal server error".
For example, I was using Ravishanker Kusuma's jQuery Upload File plugin and was getting this message.
Turns out it was just a missing ) in an (unused) function inside my code in the PHP processor file specified by the AJAX script. When a file was uploaded, this script would be called, the script would break inside the unused function, and this is the error it would report.
FWIW
None of the solutions above worked for me.
For CentOS users with Plesk Pannel follow the next steps
Change this value in the template
# grep -ir FcgidMaxRequestLen /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php
FcgidMaxRequestLen 16777216
# sed -i 's/FcgidMaxRequestLen 16777216/FcgidMaxRequestLen 1073741824/g' /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php
# grep -ir FcgidMaxRequestLen /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php
FcgidMaxRequestLen 1073741824
Rebuild the virtualhost configurations.
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all
# /usr/local/psa/admin/bin/httpdmng --reconfigure-server
https://support.plesk.com/hc/en-us/articles/213955145-Unable-to-upload-large-files-via-PHP-HTTP-request-length-exceeds-MaxRequestLen

Categories