Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Downloads deliver an empty zip file

    Everything is working fine with the downloads except that the zip file shows up with nothing in it.

    I do have downloads by redirect turned on and what I have discovered is that there is nothing in the pub directory for those redirects. as the documentation says there should be. There is one folder named .ulcwvnoxjdtmrhrirl but it is empty.

    This is a linux server, the folder permissions were set to 777 (and actually 755 should work as well). These zip files are very small.

    This started happening after changing servers but don't know what to tell tech support - what server setting would create this problem?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  2. #2
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Downloads deliver an empty zip file

    My tech support is telling me this is a zen cart problem - not a server related issue. Why would this stop working after moving the cart if it's not a server issue?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Downloads deliver an empty zip file

    Quote Originally Posted by delia View Post
    My tech support is telling me this is a zen cart problem - not a server related issue. Why would this stop working after moving the cart if it's not a server issue?
    Exactly.
    .

    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.

  4. #4
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Downloads deliver an empty zip file

    Thanks for that confirmation. Grrrr......
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Downloads deliver an empty zip file

    Quote Originally Posted by delia View Post
    Everything is working fine with the downloads except that the zip file shows up with nothing in it.
    Do you mean it's zero bytes? Or that it's got content that cannot be unzipped?
    Quote Originally Posted by delia View Post
    Everything
    I do have downloads by redirect turned on and what I have discovered is that there is nothing in the pub directory for those redirects. as the documentation says there should be. There is one folder named .ulcwvnoxjdtmrhrirl but it is empty.

    This is a linux server, the folder permissions were set to 777 (and actually 755 should work as well). These zip files are very small.

    This started happening after changing servers but don't know what to tell tech support - what server setting would create this problem?
    With download-by-redirect, Zen Cart does the following very simple process:
    a) generates a random foldername under /pub/
    b) calls the PHP function to generate a symlink from the file in the /download/ folder to that new folder under /pub/ ... thus becoming /pub/.abcwhatever/filename_to_download.zip
    c) and then redirects the customer's browser to that file under the pub folder, leaving it entirely up to apache (webserver engine) to do the download/delivery of the file entirely independent of PHP

    So, if the server doesn't support symlinks, step b won't work. Some older PHP versions didn't support it because of filesystem/OS limitations, especially on windoze servers. If permissions prevent the creation of the folder or the generation of the symlink stub, then of course you've got a problem. If your filesystem can't handle symlinks, then you've got a dud hosting service, and will have to use an alternate delivery method - Zen Cart has 3 modes, each with varying security implications and server resource (CPU/RAM) demands.
    .

    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.

  6. #6
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Downloads deliver an empty zip file

    zero bytes, it opens but there's nothing there.

    This is a dedicated server and they are going to have to fix.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  7. #7
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Downloads deliver an empty zip file

    So they had disabled the php readfile function the server. More secure but unusual.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  8. #8
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Downloads deliver an empty zip file

    Quote Originally Posted by delia View Post
    So they had disabled the php readfile function the server. More secure but unusual.
    Yes, a little unusual.
    In considering workarounds, note that: That would only be a problem if Download By Redirect was off, or if symlink creation failed (due to server's inability to create symlinks, or permission problems) and Download By Streaming is off.
    .

    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.

  9. #9
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Downloads deliver an empty zip file

    hmm, I had found error logs in the cache about the readfile error and assumed. So I assumed wrong?

    I ended up using download by streaming as my files are very small but still want this working server wide in case it comes up with a client.

    I would have had download by streaming off and redirect on at the time.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Downloads deliver an empty zip file

    Quote Originally Posted by delia View Post
    I would have had download by streaming off and redirect on at the time.
    So, if Redirect was set to on, but the server's configuration wasn't allowing the symlinks to be created, it would failover to attempting to deliver the file directly, thus triggering your readfile problem. By turning on Download by Streaming it bypasses the attempt to use readfile and instead stream it in smaller chunks.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Help Zip Folder Empty
    By DreamyUnicorn in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 5 May 2010, 03:33 PM
  2. Faster Downloads of Mp3/zip file
    By danielledove in forum Managing Customers and Orders
    Replies: 0
    Last Post: 24 Nov 2009, 01:22 AM
  3. Replies: 16
    Last Post: 11 Feb 2009, 08:59 AM
  4. "empty" file downloads
    By cliffhaas in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 20 May 2006, 02:44 AM

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