Forum Moderators: coopster
You can use a function ini_set for this purpose. For more details [php.net...]
Thanks
Mahabub
php_flag file_uploads on
php_value post_max_size "20M"
php_value upload_max_filesize "10M"
php_value max_input_time "300"
php_value memory_limit "64M"
The advantage is the above allows you to control uploads on a per-directory basis (the directory where the .htaccess resides) as opposed to an all out system-wide or program-wide alteration.
Previous thread [webmasterworld.com] if you're doing this for image uploads and the probable implications that can arise when you exceed the 2MB limit for images:
GD takes a compressed image, say, .jpg or .gif, and creates a full bitmap in memory to do any manipulation. As soon as you cross the "2MB limitation" of php, this because a resource hog and you have to start increasing the allowed memory for php, or, switch to the less memory intensive IMagick/ImageMagick methods.
It will take all of five minutes to test. Drop the above into an .htaccess file, upload it and a stock phpinfo() script in the same directory. Request the php info script. See what it says.
Never tested on Windows servers, only Linux based servers.