• Resolved sloanal

    (@sloanal)


    Hi – I’ve been using this plugin with great success for two years – I love it. Recently, all downloads are coming through corrupted.

    My problem began occurring after a version upgrade I made a few months ago – I can’t recall what version I was using last without errors. My users (the people using the codes) are reporting zips that cannot be expanded / extracted.

    When I run through a download on my Windows 7 machine using Chrome and try to extract the zips I can replicate the issue – I get an error saying they’re “invalid” and wont expand. If I transfer the same zip over to my machine running OSX, the zips expand fine. All zips downloaded using OSX work fine.

    I’ve downloaded the zips directly using an FTP and they expand fine, so it’s not the files that are corrupted – it’s the downloader.

    I’ve tried to implement the code in the below thread but no luck. Plus, I believe that was written for an older version of this plugin. https://www.ads-software.com/support/topic/plugin-wp-download-codes-zips-and-mp3s-are-corrupted?replies=2

    Any ideas out there? It should work just fine…

    Thanks in advance.

    https://www.ads-software.com/plugins/wp-download-codes/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author misanthrop

    (@misanthrop)

    This is really difficult to say. It should work in most of the Environments since the latest changes. Can you check your WordPress option “dc_header_content_type”?

    Thread Starter sloanal

    (@sloanal)

    Thanks for the reply –

    Right now in the plugin’s settings, the Content Type is set to “application/download”. I’ve tried the download with every other setting combination (default, force-download, etc) and it doesn’t seem to fix the issue.

    Is this what you’re referring to? I might be misunderstanding..

    The plugin is being used at https://tenderlovingempire.com/redeem-download

    Thanks again.

    I have the same issue …it’s in the fopen() / fread() part of the dc_headers() function it goes wrong. Empty ZIP’s …I tried to replace it with a simple readfile() funtion, and it works for small files.

    I would love to see this one worked out as well …spend a day debugging with no results :-/

    @misanthrop: I ran into the same issue and managed to fix it using the readfile function (similar to Andy’s fix). You can find the patch in git. I can’t send a pull request to the git repo, though, so I’m afraid you’ll have to import the patch manually.

    The problem with the readfile function is; it loads the file into memory …so, 2 users downloading 64MB uses 128MB of RAM given to your site. Most WordPress hosts only use 128MB sites. Downloading a 250MB ZIP (an album) will fail …not a solution.

    Plugin Author misanthrop

    (@misanthrop)

    Thank you both for your thoughts. I cannot find the patch, but as Andy says, this is not a solution anyway. I am really struggling with some client and server deployments, because most of the time it works.

    I did a rewrite on this one …i have the files in two folders, the folders are renamed every two hours. Well …one of the folders are renamed every 2 hours …so there is at least 2 hours download from a shared folder. The files in the folder are static files and users are redirected to them.

    Plugin Author misanthrop

    (@misanthrop)

    Can you all try again with version 2.4.0 if your issues are resolved? If not, please let me know your detailed setups and reproduction steps. Also check out my comments here: https://www.ads-software.com/support/topic/safari-1?replies=12

    Love this plugin but it’s only at about a 65% success rate for me right now. I recently sent out about 100 download codes to fans for their advance album download (zip file) of our latest album and it has worked for most but there’s a handful of folks who are getting errors that the zip is invalid or could not be unarchived. Any thoughts? I’m running the latest version of this plugin (2.5) and WordPress v3.9.2 – Thanks!

    I had a similar problem a few years ago, and misanthrop directed me to stop using whatever cache plugin I had in place (WP Super Cache).

    Instead, he recommended that I use a combination of “DB Cache Reloaded Fix” and “Hyper Cache”. Since moving to those caching plugs, I’ve had no problems employing this on 5 or 6 websites, with different server configurations.

    If you haven’t tried this yet, I recommend giving it a shot. I’ve had this plugin running solidly for a couple years now for two small record labels that have both been using the sh*t out of this plugin.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Downloads, Zips Corrupted’ is closed to new replies.