Is there any file limit in php ZipArchive?

35 Views Asked by At

I have the following problem, I have an array with several Amazon S3 links referring to .xml files.

I then pass these files through a forach and place them using php's ZipArchive addFromString.

The problem is that for some reason it always adds approximately 15 thousand files and my client has 31 thousand files.

It does not generate an error that terminates the execution of my script.

    foreach(json_decode($res->getBody()) as $xml){

        $caminhoArquivo = parse_url($xml, PHP_URL_PATH);
        $name = basename(urldecode($caminhoArquivo));
        

        $request = new Request('GET', $xml);
        
        try {

            $content = $client->sendAsync($request)->wait();

        }catch(Exception $e){

            continue;
        }

        $zip->addFromString($pathe.$name, $content->getBody())
    }

I used:

ini_set('display_errors',1);

ini_set('memory_limit', '-1');

set_time_limit(0);

ini_set('max_execution_time', 0);
0

There are 0 best solutions below