Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload large files above 500MB in PHP [duplicate]

Tags:

php

I made an upload page in PHP, but I dont know why the page would not upload documents greater than 500MB, This is my first time of trying to upload something that large, I changed all the configurations in the PHP.INI (post_max_size = 700M, upload_max_filesize = 600M, and max_execution_time = 300). The codes for upload is as below

if(isset($_FILES['upload']) && !empty($_FILES['upload']['name'])){  move_uploaded_file($_FILES['upload']['tmp_name'], $this->filePath.$this->fileName); } 

I need help, I wonder if there is something am not doing right..

like image 656
James Okpe George Avatar asked Apr 19 '13 10:04

James Okpe George


1 Answers

Do you think if increasing upload size limit will solve the problem? what if uploading 2GB file, what's happening then? Do you take into consideration the memory usage of such a script?

Instead, what you need is chunked upload, see here : Handling plupload's chunked uploads on the server-side and here : File uploads; How to utilize "chunking"?

like image 80
Twisted1919 Avatar answered Sep 23 '22 03:09

Twisted1919