Zip File Corrupted in Magento Downloadable Product

Salams,

Late Ramadhan Mubarak infact very late May aswell wish you all a Eid Mubarak at this stage!

Anyway heres a  problem i was scratching my head over

We tend to use Magento CMS System for our E-commerce based website and for NasheedChannel.com (Some Great Nasheeds there btw do check it out :D)

Anyway We offer the option of Digital Download for our mp3 products so people can purchase single tracks or the entire album

So we had a few issues from customers when they purchased the full album which was infact a .zip file containing all the mp3 tracks in there that after they downloaded it the file was corrupted and could not open it, this was only after being redirected the the product download link via their control panel in magento

Tried downloading it directly from the link works fine…

so it must be the way Magento is translating the URL for download (It does not give the direct URL for good reason) it comes with a different URL with a bunch of random generated characters which is good

But anyway there was a few suggestions on the internet floating around about changing .htaccess files and messing about with them …tried it all did not work

Then realised that When magento passes the URL it Compresses it again

So we already had a zip file with the mp3 that was compressed…..so when a customer purchases the the .zip file it does it again

So the best solution for this is that if you need to upload a Zip file ensure that NO COMPRESSION is set from winrar you choose “No Store” or winzip “No compression” upload it and it worked!

Yes file sizes are larger but if you cant be bothered messing around with .htaccess files etc then this is a workaround that works

HTH!

Wassalam for now!

Advertisements

One comment on “Zip File Corrupted in Magento Downloadable Product

  1. Another possible red flag for those using FastCGI: FcgidBusyTimeout.

    In my case downloads would occasionally work from one physical location but not another. It appeared as if the only variable.was the internet connection itself. A user might start a 300mb download but that download would only get to ~200mb before ‘completing’, which would then result in a corrupt zip.

    This was because the server was using PHP over FastCGI and the culprit was FcgidBusyTimeout which by default will timeout any process after only 30 seconds.

    Hence on a fast connection the download would complete, but on a slower connection the timeout would kick in resulting in a corrupted download

    If you are running FastCGI you can alter this setting (on Ubuntu/Debian) by editing:

    /etc/apache2/mods-enabled/fcgid.conf

    In my case i set FcgidBusyTimeout to 3600 (3600 seconds = 1 hour) which i expect to be long enough for almost any scenario.

    FcgidBusyTimeout 3600

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s