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

Source: Internet
Author: User
Tags apache windows
When uploading large files in PHPfastcgi mode (about 300 kB), an error is returned ,. When uploading large files (about 300 K) in PHPfastcgi mode, an error is reported. when uploading images in a project recently, more than 300 K is reported. a server error is returned, which has never been encountered before, incorrect PHP fastcgi mode for uploading large files (more than 300 K,

When uploading images in a project recently, there were more than 300 K results. a server error was reported, which was never encountered before. the error details are 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.




Http://www.bkjia.com/PHPjc/886145.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/886145.htmlTechArticlePHP fastcgi mode upload large files (about more than 300 K) error, recently uploaded images in the project, about more than 300 K, the results reported a server error, I have never encountered it before. the error...

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.