bms at mscis.org
Wed Jan 3 08:35:26 MST 2007
Wade Preston Shearer wrote:
> I am trying to limit the upload file size on a per virtual host basis
> (ie, I don't want to do it globally in php.ini). I added it within the
> virtual host tags in httpd.conf like this:
> <VirtualHost *:80>
> . . .
> php_flag upload_max_filesize 100000
> I also added the following hidden field to the upload form:
> <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
> When testing however, I was able to upload a 1.5 MB file.
> What am I doing wrong or missing?
I'd try post_max_size:
> Sets max size of post data allowed. This setting also affects file
> upload. To upload large files, this value must be larger than
> If memory limit is enabled by your configure script, memory_limit also
> affects file uploading. Generally speaking, memory_limit should be
> larger than post_max_size.
> When an integer is used, the value is measured in bytes. You may also
> use shorthand notation as described in this FAQ.
> If the size of post data is greater than post_max_size, the $_POST and
> $_FILES superglobals are empty. This can be tracked in various ways,
> e.g. by passing the $_GET variable to the script processing the data,
> i.e. <form action="edit.php?processed=1">, and then checking if
> $_GET['processed'] is set.
More information about the UPHPU