近日將論壇從vbb2升級到vbb3,將上傳附件大小設(shè)置為2m,可每次上傳超過500k的附件都會出錯,而之前使用vbb2時卻正常。
仔細檢查php.ini,其中的upload_max_filesize=8m,沒有任何問題,然后將其中的:
max_execution_time = 30 max_input_time = 60memory_limit = 8m
數(shù)值分別調(diào)大到120、180、32m,還是沒有任何作用,令人非常頭痛!
然后開始懷疑是http.conf配置文件出現(xiàn)的問題,但從頭到尾檢查了一遍也沒發(fā)現(xiàn)任何異相,此問題智能擱置。
有一天需要給服務(wù)器加入一個子域名,去更改/etc/httpd/conf.d/文件夾下的access.conf文件,發(fā)現(xiàn)此文件夾下還有一個php.conf,趕忙打開,里面是如下內(nèi)容:
## 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.#<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
limitrequestbody 524288中的524288正好跟512kb相等,將其更改為2097152,不能上傳超過2m附件的問題解決!
再回憶一下,發(fā)現(xiàn)以前用vbb2時的操作系統(tǒng)為rhas 2.1,用的自帶的apache 1.x版本,后來升級成vbb 3之前,順便也把系統(tǒng)更換為rhas3,而rhas3自帶的apache為2.x版本,其配置文件的組織方式有所改變,也許自己編譯安裝的apache就不會出現(xiàn)此種問題,可自己比較懶,不喜歡編譯,呵呵.
新聞熱點
疑難解答