note 27401 added to features.file-upload
| From: | travis dot lewis at amd dot com | Date: | Wed, 04 Dec 2002 18:58:21 +0000 |
| Subject: | note 27401 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40346@lists.php.net to get a copy of this message | ||
If you we dumb like me you installed Redhat 8.0 and kept the default install of packages for Apache
2.0 and PHP4.2.2. I could not upload any files larger than 512kB and all the php directorives were
set to 32MB or higher.
memory_limit = 128M
post_max_size = 64M
upload_max_filesize = 32M
And my upload web page was set to 32MB as well:
<Form ID="frmAttach" Name="frmAttach" enctype="multipart/form-data"
action="attachments.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="33554432" />
However, the insiduous php.conf (/etc/httpd/conf.d/php.conf) file used by default RPM install of
Redhat httpd has a LimitRequestBody set to 512kB ("524288" ). Adjusting this to 32MB
("33554432") got things going for the larger files. Here is my php.conf file in its
entirety. Hope this helps someone. L8er.
#
# 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.so
#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 33554432
</Files>
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+27401
http://master.php.net/manage/user-notes.php?action=delete+27401
http://master.php.net/manage/user-notes.php?action=reject+27401