[CentOS] PHP file upload limit

Drew drew.kay at gmail.com
Wed Jun 9 19:41:34 UTC 2010


> I have no problem setting my upload limit ( upload_max_filesize ) to 1
> GB but for some reason 2 GB or above seems to be no go. Would anybody
> know why? Could it be one of the many 32-bit vs 64-bit issues?

upload_max_size is not the only variable that would affect uploading.
You may also want to look at the settings for:

post_max_size -- uploading files is done through the HTTP POST
mechanism so this has to be at least as big as upload_max_size
memory_limit -- If memory limits are enabled, this also must be larger
then upload_max_size

It may also be a 32bit limit as well:

(from php.net)
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.


-- 
Drew

"Nothing in life is to be feared. It is only to be understood."
--Marie Curie



More information about the CentOS mailing list