When uploading large files in PHPfastcgi mode (more than 300 K), an error is reported.

Source: Internet
Author: User
Tags apache windows
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.

Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.