I
I
Ilya Beloborodov2016-11-03 04:00:06
linux
Ilya Beloborodov, 2016-11-03 04:00:06

Curl out of memory: how to download a file over 100MB?

there is such a crutch

shell_exec("
        curl -X POST https://content.dropboxapi.com/2/files/alpha/upload \
          --header 'Authorization: Bearer ".$token."' \
          --header 'Content-Type: application/octet-stream' \
          --header 'Dropbox-API-Arg: {\"path\":\"".$folder."/".$name."\",\"mode\":{\".tag\":\"add\"}}' \
          --data-binary @'/backup/".$name."'
    ");

The fact is that he doesn’t want to upload files larger than 100mb, he writes curl: option --data-binary: out of memory, apparently the file is cached in RAM, I know that it’s possible without caching. How??? You need to throw archives of 1.5 GB

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
noys, 2016-11-10
@noys

Maybe php.ini?
Why shell_exec if there is a curl module in php?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question