-1

I am trying to backup 5.9gbyte files in php. But my code is memory limit. file_get_contents function is not reading big file such as 3G, 5G zip file. So i have memory error. So i tried to split file

enter code here
    $in = @fopen($file, "r");
    $path = str_replace($source . '/', '', $file);
     while ($buff = fread($in, 4096)) {
     $zip->addFromString($path, $buff);
    }

But this is error about backup of big file when create zip file from big file directory. Thanks.

Jincowboy
  • 53
  • 1
  • 11
  • wait, you're zipping 5.8gb with php? Please... do `exec('zip backup.zip file.a file.b file.z')` or a recursive. Don't use php for the zipping, use the native tools. Hell even install 7zip if you're running on windows and use the command line part of it. – Tschallacka Nov 20 '17 at 10:13
  • I am trying big file backup in wordpress plugin code – Jincowboy Nov 21 '17 at 01:05

1 Answers1

0
post_max_size=0

Have a look at this manual it will help you with problems like this one: guide

pr1nc3
  • 8,108
  • 3
  • 23
  • 36