s3-bucket-stream-zip-php
s3-bucket-stream-zip-php copied to clipboard
Files inside the zip file have 0kb size
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
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.
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?
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!
I've seeing the same issue on MacOS 10.12.2 using PHP 7.1.
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)