do we have any size issue with the file uploads that we perform in php using $_file[upload][name]? is there any restriction for the file upload using this ??? juz need to know ..
+8
A:
In your php.ini
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
and (added after suggestions from others below)
; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
post_max_size = 8M
Mchl
2010-07-28 14:49:06
Don't forget post_max_size as well. It doesn't matter that upload_max_filesize=2G if post_max_size=16k
Mark Baker
2010-07-28 14:51:40
@Mark, your remark is incorrect, altough uploaded files are part of post data. PHP will allow, and handle correctly, upload_max_filesize=1G with post_max_size=2M. You'll get 1G files through, but otherwise post data is limited to 2m.
jmz
2010-07-28 18:35:35
There's also server-side limits, such as Apache's LimitRequestBody on top of all this.
Marc B
2010-07-29 03:55:38
+2
A:
You can limit maximum file uploaded size (you should change appropriate directives in your php.ini file). There are no other ways to limit uploaded file size.
upload_max_filesize = 1M //Maximum size of uploaded file
max_post_size = 1M //Maximum size of whole POST request
Kirzilla
2010-07-28 14:49:48
+1
A:
Yes, this is restricted specifically by upload_max_filesize and also more generally by post_max_size settings in your php.ini.
Cags
2010-07-28 14:51:16
+2
A:
You can also change limits in .htaccess file:
php_value upload_max_filesize 10M
php_value post_max_size 20M
netme
2010-07-28 14:53:46