Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File upload maximum size in php

I'm implementing a file upload system using cakephp. I'm using php 5.2.5 and cakephp 1.2. Below I have mentioned the maximum file sizes that I have given in php.ini.

post_max_size = 2000M
upload_max_filesize = 1800M 
memory_limit = 3328M  

But I need to upload 5 GB files and when I change the file upload sizes to 5GB in php.ini web server doesn't respond. Is there any method that I can use to upload 5 GB files to my system? and How can I calculate the maximum size of the file that I can configure in php.ini.

By migrating to php 5.3 will I able to support more capacity for file uploading.

Cheers !!!!

like image 818
Shanaka Avatar asked Mar 22 '26 11:03

Shanaka


1 Answers

AFAIK uploading 5GB with a HTML-Form is really big. Don't forget that the binary data is normally read in raw 8-bits but the TCP/IP stack only support a 7-bit charset to transport. So all your data is wrapped in another code BASE64 which adds about 40% overhead to your data so it's 6+ GB. I dont't know if upload size should include this overhead but you can try to add this to post max size because according to the documentation post max size should be double the size of upload size. I also to suggest you to use lighttpd + fast-cgi.

like image 107
Micromega Avatar answered Mar 24 '26 01:03

Micromega