Solve the limitation of PHP upload file size in Apache2 in RHAS3_PHP tutorial
WBOY
Release: 2016-07-21 16:12:06
Original
796 people have browsed it
Recently, the forum was upgraded from VBB2 to VBB3, and the upload attachment size was set to 2M. However, an error occurred every time I uploaded attachments exceeding 500K, while it was normal when I used VBB2 before.
Carefully check php.ini, upload_max_filesize=8m, there is no problem, then change the following values:
I turned it up to 120, 180, and 32M, but it still had no effect. It was a huge headache!
Then I began to suspect that there was a problem with the http.conf configuration file, but I checked it from beginning to end and found nothing out of the ordinary, so I put this issue aside.
One day I need to add a subdomain name to the server and change the access.conf file in the /etc/httpd/conf.d/ folder. I find that there is another php.conf in this folder and I quickly open it. , which contains the following content:
524288 in LimitRequestBody 524288 is exactly equal to 512KB, change it to 2097152, and the problem of not being able to upload attachments exceeding 2M solve!
Recalling it again, I found that when I used VBB2, the operating system was RHAS 2.1, and I used the built-in Apache 1.x version. Later, before upgrading to VBB 3, I also changed the system to RHAS3, and RHAS3 The built-in Apache is version 2.x, and the organization of its configuration files has changed. Maybe if you compile and install Apache yourself, this problem will not occur, but I am lazy and don't like compiling, haha.
http://www.bkjia.com/PHPjc/313781.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/313781.htmlTechArticleRecently upgraded the forum from VBB2 to VBB3, and set the upload attachment size to 2M, which can upload more than 500K at a time There will be errors in attachments, but it was normal when using VBB2 before. Check php.ini carefully, it...
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn