PHP fastcgi mode large File upload 500 error

Source: Internet
Author: User
Tags apache windows file upload http request

Recently uploaded pictures in the project, about more than 300 k, the results reported a server error, never encountered before, the error is as follows:

Mod_fcgid:www.111cn.net HTTP Request Length 132296 (so far) exceeds Maxrequestlen (131072)

Check the data, found fastcgi the default request size is 131072, so in the Apache configuration to add Maxrequestlen configuration is good. If you only need to modify the Maxrequestlen of a single virtual host, it is a setup problem in fastcgi mode, which needs to be specified in the configuration file. htaccess or directly in the Apache configuration file http.conf, as follows:

The code is as follows

<ifmodule mod_fcgid.c>
AddHandler Fcgid-script. fcgi
Fcgidconnecttimeout 20
# to get around upload errors when uploading images increase the maxrequestlen size to 15MB
Fcgidmaxrequestlen 15728640
</IfModule>

If you are php+apache Windows environment, we can configure the following

Found in the php.ini.

Upload_max_filesize, and other post_max_size, Max_input_time, Memory_limit, max_execution_time configuration

The upload size changes after the restart of Apache can be resolved.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.