PHP fastcgi mode uploads large files (approximately more than 300K) and reports an error, _PHP tutorial

WBOY
Release: 2016-07-13 10:18:01
Original
901 people have browsed it

PHP fastcgi mode uploads large files (about 300K) and reports an error,

When I uploaded pictures in the project recently, the size was about 300K, and a server error was reported. I have never encountered it before. The error content is as follows:

mod_fcgid: HTTP request length 132296 (so far) exceeds MaxRequestLen (131072)

After checking the information, I found that the default request size of fastcgi is 131072, so I just added the MaxRequestLen configuration in the apache configuration. If you only need to modify the MaxRequestLen of a single virtual host, it turns out to be a setting problem in fastcgi mode. You need to specify it in the configuration file .htaccess or directly in the apache configuration file http.conf, as follows:

The code is as follows

Copy code The code is as follows:


AddHandle fcgid-script .fcgi
FcgidConnectTimeout 20
# to get around upload errors when uploading images increase the MaxRequestLen size to 15MB
FcgidMaxRequestLen 15728640


If you are in a php+apache windows environment, we can configure it as follows

Found in php.ini

upload_max_filesize, and other post_max_size, max_input_time, memory_limit, max_execution_time configuration

Change the upload size and restart apache to solve the problem

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/886145.htmlTechArticlePHP fastcgi mode uploads large files (approximately more than 300K) and reports an error. Recently, when uploading pictures in the project, There are about more than 300K, but a server error was reported. I have never encountered it before. The wrong one...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!