Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2008
    Posts
    37
    Plugin Contributions
    0

    Default Downloadable product 'invalid file'

    Hi,
    I have some downloadable products in zipped files. When the customer purchases them the checkout process is fine and they can download the product but when they go to open/unzip the file they get the error message 'invalid file' or "Windows cannot open the foler. The compressed (zipped) Folder.... is invalid.". These customers have ordered other digi products from other store with no problems so they do know how to open zipped files. I then email them the same file and it opens fine.
    I have gone through the checkout process and I can do it just fine without any troubles. I use a Mac and the program Win-zip-Mac to zip the files and it seems that only Windows customers are having troubles.
    I am using Zencart 1.3.9
    Any suggestions would be greatly appreciated

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Downloadable product 'invalid file'

    The most common cause of that sort of thing is that the files are corrupted due to either the server encountering a timeout or a PHP error causing text to be added to the top of the downloaded file's contents.

    Have you looked at the actual file they've downloaded (ie: have them send you the file) to see whether there is text or html or php code at the start of the file? If the files are large then you'll probably need a hex editor to view them instead of a typical text editor. Notepad++ might still handle it. On your mac it might be possible to just use quicklook to see whether the start of the file is damaged in any way, even if that means renaming the file to have a .txt extension so quicklook can peek at it.

    Which version of Zen Cart 1.3.9 are you using? (there were several)
    And is this problem isolated to certain file-types? ie: .zip or .pdf etc? What file extensions are yours?
    Are you using download-by-redirect? or direct? or streaming?
    Have you customized the .htaccess in your /pub/ folder for any particular reason? If so, why?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2008
    Posts
    37
    Plugin Contributions
    0

    Default Re: Downloadable product 'invalid file'

    Hi,
    Thanks for all that info! I'm waiting on the customer to forward the file to me, and a response from the builder of the site - jettrue - as I'm sure she will understand everything you've written (a little out of my league).

    Zen Cart : 1.3.9h installed 30th June, 2011
    I only have .zip at the moment

    That's all I can answer at the moment :)

    Thanks once again!!

  4. #4
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Downloadable product 'invalid file'

    Dr Byte.

    I don't believe there is anything wrong with the zip. It seems there is a bug with some versions of IE/ windows versions, and I think this is what's going on:

    http://blogs.msdn.com/b/aoakley/arch.../14/49655.aspx

    Basically, if the IE user either chooses "open" instead of save, or if they have the setting to always open zip files applied.

    When googling "the compressed folder is invalid", I saw a drupal thread with the same issue. It seems their fix was something about changing the http headers for downloading zip files to:

    Content-Length: 63262
    Content-Type: application/x-zip-compressed

    Here's that thread
    http://drupal.org/node/213262

    Also, the customer helping test reports that the file opens fine if downloaded with Firefox.

    It's strange. If the file is downloaded via a direct link from the server, opens fine. There's something in the download from zen cart process, or in the server settings, combined with an old bug in IE when files are opened without saving.
    Last edited by jettrue; 1 Jan 2012 at 04:49 PM.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Downloadable product 'invalid file'

    If that's the case then I suppose you could try adding this to the end of the /pub/.htaccess file:
    Code:
    <FilesMatch ".*\.(zip|ZIP)$">
      ForceType application/x-zip-compressed
      Header set Content-Disposition attachment
      Order Allow,Deny
      Allow from all
    </FilesMatch>
    And maybe remove the zip|ZIP| from the existing FilesMatch directive.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v139h FIle Not Found (Downloadable file)
    By lissa in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 8 Oct 2014, 05:16 PM
  2. "source file could not be read" error with downloadable product
    By workaholic in forum Setting Up Categories, Products, Attributes
    Replies: 18
    Last Post: 7 Feb 2010, 12:37 AM
  3. All downloadable files are showing as invalid
    By webmiss in forum General Questions
    Replies: 18
    Last Post: 11 Jun 2009, 02:41 PM
  4. FREE Downloadable Product - Downloadable Countlessly?
    By zcnb in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 24 Jul 2008, 07:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR