Results 1 to 10 of 20

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: download timeout

    Using Download By Redirect is the same as using http like you mentioned before. All it does is create a download point, and points the customer to that to do the download the same as if they'd clicked a link you supplied in an email.
    .

    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.

  2. #2
    Join Date
    Sep 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: download timeout

    Quote Originally Posted by DrByte View Post
    Using Download By Redirect is the same as using http like you mentioned before. All it does is create a download point, and points the customer to that to do the download the same as if they'd clicked a link you supplied in an email.
    apparently not, as the alternate (outside/separate from zen cart) links i provide to customers works every time.

    just to be sure i wasn't crazy, i switched redirect to TRUE, made sure /pub was 777, throttled my bandwidth to 50k/s (to be sure it'd take a long time to download), and as predicted, the download ended prematurely after only 57MB.

    this is a serious problem

  3. #3
    Join Date
    Aug 2008
    Posts
    115
    Plugin Contributions
    0

    Default Re: download timeout

    After much struggles in getting my client's downloads to complete successfully - (some zip files are over 50MB and many were timing out before completion), I finally worked out the issue with the help of this thread.

    My Hosting company (which i cannot say enough good things about) worked diligently with us to sort out any issues that may have been on their end. However, after much testing with the Firefox "Throttler" add-on (to slow downloads and simulate a dial-up customer's experience) we were still experiencing problems with incomplete downloads ending abruptly at around 20 minutes!

    This thread finally held the answer. Despite no mention of this limitation in the Zen Cart "Download delivery methods explained" tutorial, the fact is that Zen Cart comes hard coded for a max time of 20 mins. Upping this was our answer!

    Please, Please, add a reference to this fact in the Tutorial: https://www.zen-cart.com/tutorials/i...hp?article=292
    so that others can be saved untold time and frustration.

    Maybe a future ZC version should have this value somewhere within the Admin so it's more easily discovered? Just a thought...

    Otherwise, thanks for a great product and instruction.

  4. #4
    Join Date
    Jan 2010
    Posts
    133
    Plugin Contributions
    0

    Default Re: download timeout

    Quote Originally Posted by stride-r View Post
    After much struggles in getting my client's downloads to complete successfully - (some zip files are over 50MB and many were timing out before completion), I finally worked out the issue with the help of this thread.

    My Hosting company (which i cannot say enough good things about) worked diligently with us to sort out any issues that may have been on their end. However, after much testing with the Firefox "Throttler" add-on (to slow downloads and simulate a dial-up customer's experience) we were still experiencing problems with incomplete downloads ending abruptly at around 20 minutes!

    This thread finally held the answer. Despite no mention of this limitation in the Zen Cart "Download delivery methods explained" tutorial, the fact is that Zen Cart comes hard coded for a max time of 20 mins. Upping this was our answer!

    Please, Please, add a reference to this fact in the Tutorial: https://www.zen-cart.com/tutorials/i...hp?article=292
    so that others can be saved untold time and frustration.

    Maybe a future ZC version should have this value somewhere within the Admin so it's more easily discovered? Just a thought...

    Otherwise, thanks for a great product and instruction.
    I'm having a very similar problem with a customer using dial-up to download a 5 MB file - it times out at about 20 minutes.

    Where is this 20 minute limit set, and how do I change it?

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: download timeout

    Quote Originally Posted by OrcaSoul
    Where is this 20 minute limit set, and how do I change it?
    I suspect tht it is a php parameter and not a ZenCart setting
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jan 2010
    Posts
    133
    Plugin Contributions
    0

    Default Re: download timeout

    Quote Originally Posted by kobra View Post
    I suspect tht it is a php parameter and not a ZenCart setting
    OK, I just did some searching of the entire Zen Cart installed code using CEDIT, and came across something that looks like it may be where it happens:

    Starting at line 143 in includes/modules/pages/download/header_php.php

    Code:
    if (DOWNLOAD_BY_REDIRECT != 'true' or $link_create_status==false ) {
      // not downloading by redirect; instead, we stream it to the browser.
      // This happens if the symlink couldn't happen, or if set as default in Admin
      header("Content-Length: " . (string)$zv_filesize);
      if (DOWNLOAD_IN_CHUNKS != 'true') {
        // This will work on all systems, but will need considerable resources
        $zco_notifier->notify('NOTIFY_DOWNLOAD_WITHOUT_REDIRECT___COMPLETED');
        readfile(DIR_FS_DOWNLOAD . $origin_filename);
      } else {
        // override PHP timeout to 20 minutes, if allowed
        //@set_time_limit(1200);
        @set_time_limit(4800);	// test at 1 hr, 20 min for dialup.
    Note the last 2 lines, where I set the limit to 4800.

    I set an email to him to test this, should know by tomorrow if this works.

    If it does, I'll want to copy this to the appropriate folder in modules/orcatools/pages/ to be sure it'll override any updates.

    I'll let you know how it goes.

  7. #7
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: download timeout

    If it does, I'll want to copy this to the appropriate folder in modules/orcatools/pages/ to be sure it'll override any updates
    There is no "classic" folder under /pages - - so these are not overrideable

    Nice find but note "if allowed"
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. v155 Admin timeout: setting the length of timeout before rolling in again
    By acmaurer in forum General Questions
    Replies: 5
    Last Post: 8 Feb 2017, 02:00 AM
  2. COWOA won't allow customer to download file from download folder
    By fawad123 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 May 2011, 01:27 PM
  3. Dialup download timeout
    By OrcaSoul in forum General Questions
    Replies: 6
    Last Post: 16 Mar 2010, 10:58 AM
  4. why i can download file from download folder directly?
    By plonolp in forum General Questions
    Replies: 5
    Last Post: 12 Apr 2007, 11:39 PM

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