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. 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 = 8 m
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. php3 # cause the PHP interpreter handle files with. PHP extension. # <files *. php> setoutputfilter PHP setinputfilter PHP limitrequestbody 524288 </Files> # 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 of 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.