Re: Max File Upload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
On Tue, August 15, 2006 1:50 pm, Jeremy Privett wrote:
http://us2.php.net/manual/en/ini.core.php#ini.upload-max-filesize

In later versions of PHP, you can't use ini_set to set
upload_max_filesize
... The changeable option is PHP_INI_PERDIR now, meaning you can only
change
it in php.ini, .htaccess or httpd.conf ...

http://us2.php.net/manual/en/ini.php#ini.list

Like it says in the user contributed notes on that page, you have to
use
php_value in .htaccess to adjust the setting.

Example: php_value upload_max_filesize 20M

But, for sure, ini_set ain't gonna work as it's MUCH too late in the
game for a file upload change.

Yup :)

Also, I don't think '20M' will work in httpd.conf, as I don't think
Apache considers '20M' to be a valid numeric value...

You may need to use 20000000 to get aproximately 20 Meg.

But it's not apache that is reading this value. It's in the .htaccess file, but it is going through the php_value directive provided by the PHP Module (there is also it's companions php_flag, php_admin_value and php_admin_flag for use in different situations - e.g. php_admin_* in httpd.conf will prevent it being overridden in .htaccess with php_* calls).

PHP has be be configured as a module for this to work too. Apache wont know what php_value means if PHP is in CGI mode.

So I think the 20M will be OK.

I can't rembmer but does Apache have a max size that is independant of PHP? Perhaps you'll need to set both?

While on the topic, is there a nice way to show users progress when file uploads occur? This could be client side/javascript etc. but to upload a 20Meg file will take a while so some form of feedback is important IMO.

What is the absolute maximum that is sensible to use? Are there any other techniques to use (e.g. Applet etc.).

Col.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux