Reputation: 1738
What is the maximum file upload size allowed in the post_max_size
and upload_max_filesize
configuration options (in PHP 5.3)?
Upvotes: 1
Views: 4231
Reputation: 3217
According to the manual entry about post_max_size
:
Note:
PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you're using 32bit versions) as it will cause your script to fail.
Your limit could be 32bit signed integer limit. ~2,147,483,647 bytes on a 32 bit version. See the PHP_INT_MAX
constant to get the value for your system:
PHP_INT_MAX (integer)
The largest integer supported in this build of PHP. Usually int(2147483647). Available since PHP 4.4.0 and PHP 5.0.5
Related:
Upvotes: 3
Reputation: 11
There is no real limit set by PHP to post_max_size or upload_max_filesize. However both values must be smaller than memory_limit (also you can modify this). Anyway, as values use something (a lot) smaller than your RAM. A hacker may attempt to send a very large file that will consume completely your system resources. To upload large file is better to use an FTP server.
Upvotes: 0