D
D
Dmitry2014-02-19 10:38:11
PHP
Dmitry, 2014-02-19 10:38:11

How to upload a file over 2GB using php?

Hello dear!
I installed owncloud and was very upset with the 2 GB limit. to file. In the owncloud settings, I set 10GB, in php.ini I wrote:

post_max_size = 10G
upload_max_filesize = 10G

but a 4 gigabyte file as a result on the server turns out to be 2048 MB in size.
I understand the neck is in a different place? In what and is it realistic to expand it?
[email protected]_odroid:/etc/php5/apache2# uname -a
Linux 7th_odroid 3.8.13.16 #1 SMP PREEMPT Tue Feb 11 09:43:03 BRST 2014 armv7l GNU/Linux
[email protected]_odroid:/etc/php5/apache2# apache2 -v
Server version: Apache/2.4.7 (Debian)
...
[email protected]_odroid:/etc/php5/apache2# php5 -v
PHP 5.5.9-1 (cli) (built: Feb  8 2014 08:11:20)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0
...

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
egor_nullptr, 2014-02-19
@seventh

With the current version of PHP (5.5) nothing, it will be possible only in 5.6 docs.php.net/manual/en/migration56.new-features.php

B
Boris Syomov, 2014-02-19
@kotomyava

About the innate limitation of php on the size of the download, they wrote above. To bypass, use, for example, nginx upload, or a similar module, for your favorite web server, and then in the script, simply process the uploaded as needed.

W
winbackgo, 2014-02-19
@winbackgo

Break apart. Try https://github.com/Widen/fine-uploader

S
Stepan, 2014-02-19
@L3n1n

I support the @kotomyava option . For several years I have been using the nginx upload module in the exchanger. Glitches are 100 times less, and even buns in the form of the possibility of reloading, status in%..

H
homm, 2014-11-25
@homm

You can upload to another server where there is no PHP. For example Uploadcare.com.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question