s3-bucket-stream-zip-php icon indicating copy to clipboard operation
s3-bucket-stream-zip-php copied to clipboard

Files inside the zip file have 0kb size

Open cacharrin opened this issue 8 years ago • 5 comments

I just tested the library but is not working for me.

It downloaded a file called "name-of-zipfile-to-send.zip", it contains 2 files, but files are 0Kb size.

None of the files have data... any idea?

Note: My Bucket contains 2 files

cacharrin avatar Mar 23 '16 14:03 cacharrin

Can you let me know what OS and PHP version you're running? Someone else had the same issue but it's working on my machine.

jmathai avatar Mar 23 '16 17:03 jmathai

Sure,

I'm testing in Windows 10 Pro, using the latest XAMPP with PHP 5.5.33

I just tested and problem occurs with signedUrl generation... if has https, files are 0kb, but with http it works.

Any idea?

cacharrin avatar Mar 23 '16 17:03 cacharrin

I know it is quite late but somebody might find it useful. It happened to me too and it was caused by curl not able to verify peer certificate. Turning it off helps (if it does not breach your security model): curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

BTW @jmathai Thanks for sharing!

RastoStric avatar Oct 27 '16 14:10 RastoStric

I've seeing the same issue on MacOS 10.12.2 using PHP 7.1.

tillkruss avatar Jan 14 '17 19:01 tillkruss

I had the same issue. (PHP 5.6 on CentOS 6.5)

Resetting the position of the pointer by adding fseek($fp,0); directly before the $zip->addFileFromStream() line solved it for me. (line 133 in S3BucketStreamZip.php)

whiskeyseven avatar Mar 21 '17 20:03 whiskeyseven