Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    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.

  2. #12
    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?

  3. #13
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    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

  4. #14
    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.

  5. #15
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    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

  6. #16
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,036
    Plugin Contributions
    2

    Default Re: download timeout

    That code also doesn't test at 20 minutes but at 1 hour and 20 minutes:

    80x60(seconds)=4800seconds.

    Downloadable products is a minefield and there's nothing simple at all about it.

    Older versions of IE will only handle downloads up to 2 Gbs in size. Newer versions wil handle 4 Gbs. Google Chrome handles downloads in the same way as IE.

    Firefox will handle any size of download, but if you use the "Pause" button in Firefox it actually means starting all over again from the beginning.

    The size of file which PHP can handle will depend on the number of bytes which need to be read and 32 bit systems will be able to handle fewer bytes being read than 64 bit systems will.

    Then there's the not so small matter of whether servers wll permit "Download by redirect" to work. The more scecure the server the less likely you will be to be able to use this feature - as it needs to create symbolic links in the pub folder "on the fly".

    Vger

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

    Default Re: download timeout

    Quote Originally Posted by Vger
    That code also doesn't test at 20 minutes but at 1 hour and 20 minutes:
    That was their edit to increase time
    Code:
        // override PHP timeout to 20 minutes, if allowed
        //@set_time_limit(1200);
        @set_time_limit(4800);	// test at 1 hr, 20 min for dialup.
    Zen-Venom Get Bitten

  8. #18
    Join Date
    Jan 2010
    Posts
    133
    Plugin Contributions
    0

    Default Re: download timeout

    Quote Originally Posted by Vger View Post
    That code also doesn't test at 20 minutes but at 1 hour and 20 minutes:

    80x60(seconds)=4800seconds.

    Downloadable products is a minefield and there's nothing simple at all about it.

    Older versions of IE will only handle downloads up to 2 Gbs in size. Newer versions wil handle 4 Gbs. Google Chrome handles downloads in the same way as IE.

    Firefox will handle any size of download, but if you use the "Pause" button in Firefox it actually means starting all over again from the beginning.

    The size of file which PHP can handle will depend on the number of bytes which need to be read and 32 bit systems will be able to handle fewer bytes being read than 64 bit systems will.

    Then there's the not so small matter of whether servers wll permit "Download by redirect" to work. The more scecure the server the less likely you will be to be able to use this feature - as it needs to create symbolic links in the pub folder "on the fly".

    Vger

    Since he was getting the Zen Cart timeout message, I don't think it's his browser (and he tried it on both FF & IE, with the same result). And I checked with Godaddy and received this response:
    Thank you for contacting online support. We do not place a download limit on the account. However, if the download is being processed via script, you may need to adjust the max_execution_time in your php.ini file. As your account is using php5 the file will need to be called php5.ini.
    So it looks like it's related to ZC...

  9. #19
    Join Date
    Jan 2010
    Posts
    133
    Plugin Contributions
    0

    Default Re: download timeout

    Quote Originally Posted by kobra View Post
    There is no "classic" folder under /pages - - so these are not overrideable

    Nice find but note "if allowed"
    Understood - but there is one in the same folder. As I understand over-riding, if I have a includes/modules/orcatools/pages/download/ path this will over-ride the existing includes/modules/pages/download/ files.

    Or am I confused...again?

  10. #20
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: download timeout

    Quote Originally Posted by OrcaSoul
    As I understand over-riding, if I have a includes/modules/orcatools/pages/download/ path this will over-ride the existing includes/modules/pages/download/ files.

    Or am I confused...again?
    Quote Originally Posted by Tutorial
    Wherever you see a folder named "classic" you can safely add your own /CUSTOM folder.
    As there is no existing classic folder directly under /pages - - They are not overrideble
    https://www.zen-cart.com/tutorials/i...hp?article=143
    https://www.zen-cart.com/tutorials/i...hp?article=230
    Zen-Venom Get Bitten

 

 
Page 2 of 2 FirstFirst 12

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

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