[CentOS] PHP file upload limit

Fri Jun 11 15:30:35 UTC 2010
Boris Epstein <borepstein at gmail.com>

On Fri, Jun 11, 2010 at 10:59 AM, Boris Epstein <borepstein at gmail.com> wrote:
> On Wed, Jun 9, 2010 at 3:47 PM, Jerry Franz <jfranz at freerun.com> wrote:
>> On 06/09/2010 12:32 PM, Boris Epstein wrote:
>>
>> Eero,
>>
>> I've got 4 GB of swap. At the moment all 4 GB less 100 MB of it is
>> available. That logically should be enough to allow me to upload a 2
>> GB file, I would think.
>>
>>
>> Looking at the bugtracker: http://bugs.centos.org/view.php?id=3118
>>
>> "PHP is not built with large file support on 32 bit x86, probably other 32
>> bit platforms, all releases of CentOS 4
>> Additional Information I verified that upstream does not have this problem.
>> It is severe enough for my use (scientific processing) that I am changing
>> OS."
>>
>> While the report is for CentOS4, it may be related to your problem.
>>
>> --
>> Benjamin Franz
>>
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>>
>
> OK, at least part of it could have been related to the machine being
> 32 bit. I am currently playing with a 64 bit machine. I can set my
> upload_max_filesize = 2G and that works fine; however, post_max_size
> is a problem. if I set it to 2 G it seems to fail (no POST
> transactions go through, it seems). If I set it just a tad lower (what
> I have now is post_max_size = 1948M ) it works fine. So the cutoff
> limit is somewhere in the 2G neighborhood.
>
> Any idea why that would be? Is there a parameter anywhere that limits
> how far post_max_size may go? The total memory setting I use is way
> above ( memory_limit = 6G ) and that seems not to cause any issues.
>
> Thanks for your advice everybody.
>
> Cheers,
>
> Boris.
>

Here's what further research on the topic indicates: it is unclear
whether or not PHP can handle files in excess of 2 GB in size. If it
can that would still be a relatively recent achievement. So in short
it sounds like - at this point in time - it may be safest simply not
to try to handle files that size.

See here:

http://www.bigresource.com/PHP-is-there-a-limit-to-post_max_size--1sjou1Ke.html

http://www.bigresource.com/PHP-PHP-2GB-filesize-limit-pfHnjwXh.html

http://bugs.php.net/bug.php?id=27792

http://drupal.org/node/787484

Boris.