PHP 5.6: Large file upload support

PHP version 5.6 brings support for file uploads larger than 2GiB.

We can say "thank you" to Ralf Lang for the initial patch that fixes bug #44522 , which was open since 2008.

During testing uploads of files with a size of 4 - 11GiB on my PHP-CGI setup, I noticed that files above 4GiB did not get uploaded correctly. Michael Wallner was quick to fix that bug , and now 5.6 has fully working support for big files.

Note that you don't need much RAM for this. The files are streamed onto disk without hogging RAM; my test scripts ran fine with a memory_limit setting of 16M and max_execution_time of 30. Of course you have to set post_max_size , upload_max_filesize and max_input_time to sufficiently large values.

It's not advisable to actually use this feature for normal file uploads that are made by users. There is not resume support, and file uploads may stall when the network has problems.

HTML5's JavaScript file chunking ("slicing") support is more suited for that task; it allows you to upload files in small chunks with the possibility to resume a broken upload. There are some libs which encapsulate this; one is Fine Uploader.

Written by Christian Weiske.

Comments? Please send an e-mail.