PHP: large file uploads fail

Im confused ... I can not upload files in the 2gb range. When I try to use curl to send a 1.92gb file to my site (via the API), it does not report anything about its simple. When I send a 1kb file, it reports as it should.

When I try to upload via the upload form, it ends up freezing in the middle of the path, about 33%. Although I'm not sure that only the progress indicator has frozen, or if the actual file download has been suspended. I suspect that only the progress indicator has frozen, because it still says that the data is being sent, even if the progress indicator freezes.

My php.ini (yes, its reflection is also phpinfo):

register_globals = Off magic_quotes_gpc = Off post_max_size = 2047M upload_max_filesize = 2047M max_execution_time = 25200 ; Maximum execution time of each script, in seconds max_input_time = 25200 ; Maximum amount of time each script may spend parsing request data memory_limit = 2048M ; Maximum amount of memory a script may consume (16MB) short_open_tag = On 

My vps doesn't actually have 2 GB of RAM at its disposal, but does memory_limit really need to be set so high?

How can I check this? I know that 400mb files work, I have not tested anything between 400mb and 1.92gb

You will need a premium account for testing up to 2 GB, so here you can play with:

User: testreferral

Pass: 1234

http://filefx.com

I do not understand where this problem arises.

0
post php upload curl ini
source share
2 answers

Check:

  • Memory limit. Try downloading files above and below the actual memory limit.
  • Time limit. Don't your orders take 7 hours, right?
  • Effective settings. Some settings may be overridden by the / etc server settings.
0
source share

PHP: mysql query skipped / ignored after loading large files?

Mysql timing while downloading a file. Thus, the file did not show in DB

0
source share

Source: https://habr.com/ru/post/650742/


All Articles