When uploading an image, there are more than 300 kB. a server error is returned. the default request size of fastcgi is 131072, so I added the MaxRequestLen configuration in the apache configuration. when I uploaded images in the project recently, there were more than 300 K results. a server error was reported, which was never encountered before, the error message is as follows:
Mod_fcgid: HTTP request length 132296 (so far) exceeds MaxRequestLen (131072)
After checking the information, we found that the default request size of fastcgi is 131072, so we can add the MaxRequestLen configuration in apache configuration. If you only need to modify the MaxRequestLen of a single virtual host, it turns out that the setting problem in fastcgi mode needs to be done in the configuration file. htaccess or http. conf:
The code is as follows:
The code is as follows:
AddHandle fcgid-script. fcgi
FcgidConnectTimeout 20
# To get around upload errors when uploading images increase the MaxRequestLen size to 15 MB
Fcgidmax requestlen 15728640
If you are using php + apache windows, we can configure the following:
In php. ini, find
Upload_max_filesize, and other post_max_size, max_input_time, memory_limit, and max_execution_time configurations
Modify the upload size and restart apache.