Home >Backend Development >PHP Tutorial >PHP fastcgi mode uploads large files (approximately more than 300K) and reports an error, _PHP tutorial
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
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