News:

Looking for documentation? Take a look on our wiki

Main Menu

Zlib corrupted downloadable zip-files for sale

Started by t68, December 04, 2014, 22:05:28 PM

Previous topic - Next topic

t68

Hi!
Just a tip for any of you guys that might run into problems with dowloadable zipfiles for sale that gets corrupted upon dowload.
I really had a head-scratcher solving my issue with zip-files over 50 mb getting borked when sold with a 3rd party downloads for sale plugin.
Finally found out that the zlib-compression was the culprit. Disabling this in the htaccess-file solved the problem. Put this line in there: php_value zlib.output_compression Off

Have yet to find out if I now instead get performance issues. But for now I´m very happy that we can sell files bigger thab 50mb!

Hope this might be of help.

Milbo

Which download plugin do you mean?
The one of istraxx is suitable for GB files and needs only some MB during transfer. In case you use the istraxx one, good to know that zlib can lead to broken files. Maybe it can be set directly in the php code to reduce support requests.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

t68

#2
I use this one by Reinhold:
http://www.open-tools.net/virtuemart-2-extensions/vm2-downloads-for-sale.html

Skickat från min HTC One via Tapatalk

reinhold

Thanks for the hint that zlib compression on the server can corrupt the files!

Whether zlib compression is used or not should not have any performance impact on the plugin and the webserver itself, as the plugin only reads the download file in chunks and immediately transfers these. It does not load the whole download file into memory (my very first version years ago did this, until I ran into performance problems with a ~300MB file). The only drawback is that without compression more data is sent over the network, but the load on the webserver is even less, because the webserver does not have to compress the traffic before sending.

Best regards,
Reinhold