Home > Article > Backend Development > PHP fastcgi mode large file upload 500 error_PHP tutorial
When I uploaded pictures in the project recently, the size was about 300K. As a result, a server error was reported. I have never encountered it before. The error content is as follows:
mod_fcgid: www.111cn.net 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 | |||||
|
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
Modify the upload size and restart apache to solve the problem.