Corrupted ZIP files

Developer
Dari Poland
Anggota sejak Okt 2014

On some servers files downloaded with this addon are corrupted. Both file sizes (the good one and corrupted one) are the same. After commenting the line below, the problem disappears.

header('Content-Length: ' . filesize($src));

But this is short time solution. There is no errors in log file.

tim
Founder
Dari Sweden
Anggota sejak Mei 2013
tim

Can you open the corrupted file and see if there is any other output in it? Like HMTL notices, or errors? In that case this might be helpful:


    $fh = fopen($src, 'r');
    while ($buffer = fread($fh, 1024)) echo $buffer;
    fclose($fh);```
Developer
Dari Poland
Anggota sejak Okt 2014

Ok - my bad! There was a notice on the top of file. Thanks!

Anda
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.