Welcome Guest, Not a member yet? Register   Sign In
Uploading big files with CodeIgniter fails
#1

[eluser]Sam Granger[/eluser]
Hello there!

Hope someone here might be able to help me. I want to allow users to upload files up to 2gb on my server. This however is proving to be a big issue. I think the best way I can handle uploads is by doing it the "chunked" way. Does anyone here have a nice chunked file upload library? If not, what approach would be best?

Cheers,
Sam
#2

[eluser]xerobytez[/eluser]
I dont think this issue is related to codeigniter, it sounds like you may need to adjust your upload_max_filesize in your php.ini. Just as it sounds this is the maximum file size php will allow to be uploaded not just through codeigniter but through php itself. Locate your php.ini config file and then locate "upload_max_filesize" within that file. Increase it to your liking, save and then restart your web server. Then try to upload a large file. Hope this helps.
#3

[eluser]Sam Granger[/eluser]
post_max_size is currently set to 2048M, without success. It fails at files over 600 mb or so. And I think by chunking the file upload, it would be less server intensive (I might be mistaken).
#4

[eluser]xerobytez[/eluser]
I've never used chunk uploading so I can't say anything about server load but it sounds to me like it would introduce an added level of complexity that could lead to issues. I can't think of any easy way to do chunk uploading without using 3rd party libraries or hacks. Take a look at this article for some detailed info and instructions to get large uploads working if you still want to go that route. How to Upload Large Files in PHP.
#5

[eluser]PhilTem[/eluser]
It may be two things causing your problems:
MAX_FILE_SIZE is too small - but as you said yours is set to 2048MB
PHP.ini has bad settings i.e. MAX_EXECUTION_TIME, MEMORY_LIMIT, MAX_INPUT_TIME and such settings may cause problems ending your file upload prior to finishing it.
#6

[eluser]Sam Granger[/eluser]
Problem solved, issue was that tmp folder was too small for big files




Theme © iAndrew 2016 - Forum software by © MyBB