PHP:ZipArchive :: extractTo()没有完成解压缩

I'm using ZipArchive to unzip files. It's working great, except for ONE file so far (it's 10.6MB, if that matters).

The problem is, ZipArchive::extractTo() returns FALSE, and that's correct since if fails.

BUT it doesn't completely fails: half of the file is being unzipped, and then it returns FALSE.

As this method doesn't throw any Exception, FALSE is not really great to understand what happened in the middle of that unzipping journey. If anyone already ran into that problem, i'd love some help :) Thanks!

My problem is different, but I think you're running into a memory issue.

Try to force this:

ini_set('memory_limit', '128M');
set_time_limit(0);

Also, try to get memory usage before and after script, and deal with the total:

$mem_before = memory_get_usage();
/* your script code here */
$mem_after = memory_get_usage();
printf('Memory used: %1$s bytes', ($mem_after - $mem_before));

Maybe this points you in the right direction. ;)

Best!
R