Discuzx upload file appears upload error:500 solution

Source: Internet
Author: User


This situation only occurs in PHP running in fcgid mode, Maxrequestlen parameter settings are too small. But I also installed, never encountered this situation ah? And I have not set Maxrequestlen, according to the truth he will remain the default value.

So hold not to find the problem reason not to rest, find the relevant parameter data. So to the Apache official station to see the data, originally from the Apache 2.3.6, the default value of this parameter from the previous 1GB (Khan one) adjusted to 131072 bytes (128KB). Then upload 128KB below the file will not be a problem, but over this value will be reported 500 error. Originally I used the OS is usually Ubuntu server 10.04 LTS, and this new installed server with Ubuntu server 12.04 LTS, seems to be the problem, the Apache version of 12.04 is newer, The default value of this parameter was changed to 128KB, which caused the upload file to fail, and reported 500 errors.

Once you find out why, the solution is simple. Only the configuration of this parameter needs to be added.

Open Ubuntu's fcgid configuration file for Apache:

#vim/etc/apache2/mods-enabled/fcgid.conf

Add the following parameter settings to this file. I set this to 10M, than PHP upload maximum 8M slightly larger. You can adjust the value of this parameter according to your own needs, and note that the unit of this parameter is byte.

Maxrequestlen 10240000

Save exit, restart Apache:

#/etc/init.d/apache2 restart

Test again and solve the problem.

We can also refer to this method: Http://www.111cn.net/wy/CMS/45329.htm

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.