在 apache2.0.43与php4.2.3中上载文件出错

使用最新的 Apache-2.0.43和php-4.2.3建立网站服务器,站点建立成功后发现使用php的文件上载功能当文件较大时(约几百K)系统提示错误如下:

Request Entity Too Large
The requested resource
/main/mail_write.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
------------------------------------------------------

Apache/2.0.43 Server at aaa.com Port 80


编译环境如下:(/home/src存放源文件,/server下存放有mysql执行目录,apache编译到/server目录下)
cd /home/src/httpd-2.0.43
./configure --prefix=/server/apache --enable-so
make
make install

cd /home/src/php-4.2.3
./configure --with-mysql=/server/mysql --with-apxs2=/server/apache/bin/apxs --eable-track-vars --enable-force-cgi-redirect --enable-pic --enable-inline-optimi
ation --enable-memory-limit --enable-bcmath --enable-shmop --enable-versioning-enable-calendar --enable-dbx --enable-dio --enable-mcal --with-config-file-pat
=/server/apache/conf
make
make install

编译完成后,修改 /server/apache/conf/httpd.conf
加入以下行:
LoadModule php4_module modules/libphp4.so

SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288


AddOutputFilter PHP .php
AddInputFilter PHP .php
AddType text/html .php

执行命令:
cp /home/src/php-4.2.3/php.ini-dist /server/apache/conf/php.ini

修改文件 /server/apache/conf/php.ini
将参数设置如下:
max_execution_time = 600
max_input_time = 600
memory_limit = 20M
file_uploads = On
upload_max_filesize = 20M



--------------------------------
以上操作使用 apache-1.3.27 和 php-4.1.2 使用正常