Solve the limit on the size of PHP files uploaded by Apache2 in RHAS3 _ PHP Tutorial

Source: Internet
Author: User
Tags subdomain name
Solve the limit on the size of PHP files uploaded by Apache2 in RHAS3. Recently, I upgraded the forum from VBB2 to VBB3 and set the size of the uploaded attachment to 2 MB. each time I upload an attachment larger than kB, an error occurs, but VBB2 is normal. Check php carefully. ini. recently, it upgraded the forum from VBB2 to VBB3 and set the size of the uploaded attachment to 2 MB. each time an attachment that exceeds KB is uploaded, an error occurs, but VBB2 is used normally.

Check php. ini carefully, where upload_max_filesize = 8 m, there is no problem, and then replace the following:

max_execution_time = 30  max_input_time = 60memory_limit = 8M

Increasing the value to 120, 180, and 32 M respectively does not work, which is a headache!

Then I began to suspect that it was a problem with the http. conf configuration file, but I checked it from start to end and did not find any abnormalities. this problem was shelved intelligently.

One day, you need to add a subdomain name to the server to change/etc/httpd/conf. d/access in the folder. conf file, and a php file is found in this folder. conf. open it in a hurry. the content is as follows:

## PHP is an HTML-embedded scripting language which attempts to make it# easy for developers to write dynamically generated webpages.#LoadModule php4_module modules/libphp4.soAddType application/x-httpd-php php .php3## Cause the PHP interpreter handle files with a .php extension.#
  
       SetOutputFilter PHP    SetInputFilter PHP    LimitRequestBody 524288
  ## Add index.php to the list of files that will be served as directory# indexes.#DirectoryIndex index.php

524288 in LimitRequestBody 524288 is exactly the same as 2097152 KB. change it to. you cannot upload more than 2 MB of attachments!

Recall that the operating system for VBB2 was RHAS 2.1 and Apache 1 was used. after upgrading to VBB 3 in version x, the system is also replaced with RHAS3, while Apache in RHAS3 is 2. in version x, the configuration file organization method has changed. maybe Apache compiled and installed by myself won't have this problem. you can be lazy and don't like compiling.

Bytes. Carefully check php. ini, its...

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.