Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Keepalive Timer and Orders Exporter conflict

    I have been upgrading the Orders Exporter mod and have it working perfectly in a stock v1.5.1 XAMPP environment, but a tester who also has the Keepalive Timer installed has run into a bug.
    When doing a download (but not a "save to /oexport/" file), the Keepalive code is prepended to the output file.
    http://www.zen-cart.com/showthread.p...xporter-Module (starting at post #40).
    This happens with both the old version (1.6) of Orders Exporter and the new version (attached at post #38 of that thread). The undesired output occurs in both a v1.5.1 and a v1.5.3 test setup, but not in a v1.3.9 production site (which presumably does not have the keepalive timer).

    Is this caused by antiquated download creation code in OEX (unchanged since 2008, and possibly since 2005), or by some quirk of the Keepalive code? What is the best way to resolve it?

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

    Default Re: Keepalive Timer and Orders Exporter conflict

    No, there's nothing in the keepalive-timer plugin that would inject itself unexpectedly.
    It's only triggered by the code in /admin/includes/header.php, which is loaded via <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    So, unless your plugin has an extra ill-placed call to header.php (which also loads the nav menu), I can't see why it would output any of the HTML for the keepalive script.
    Either that, or you've got something else that's loading keepalive.php unexpectedly.

    I just installed OEX from the link you posted and KeepaliveTimer from the plugins area, and they're working happily independently of one another (at least when doing an All Orders Export, both to screen and to file).
    .

    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
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Keepalive Timer and Orders Exporter conflict

    Hmm... the main file, when a download is selected by recalling itself with appropriate parameters, processes and downloads the export file, then dies, before any HTML output is reached, let alone the require header.php.
    PHP Code:
        if ($mat_dlmethod == 'stream'){        
            
    // STREAM FILE        
            
    header("Content-type: application/vnd.ms-excel");
            
    header("Content-disposition: attachment; filename=$EXPORT_TIME.txt");
            
    // Changed if using SSL, helps prevent program delay/timeout (add to backup.php also)
            
    if ($request_type== 'NONSSL'){
                
    header("Pragma: no-cache");
            } else {
                
    header("Pragma: ");
            }
            
    header("Expires: 0");
            echo 
    $filestring;
            die();
        } else { 
    //$mat_dlmethod == 'tempfile'        
            // SAVE FILE IN OEXPORT DIR 
    I will have to confer with my tester for more detail on his setup.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Keepalive Timer and Orders Exporter conflict

    I came across a report of Keepalive Timer interfering in the same way with a different order export mod by econcepts: (post 397)
    http://www.zen-cart.com/showthread.p...er-Information

    When the Keepaive timer is installed in my v1.5.1 XAMPP test site, I get a blank page after login until I specifically go to /myadmin/index.php, an issue also reported by Rixstix which he says is abated when he applies a file modified in some unknown way by Ajeh. After Keepalive installation, I do not get the code inserted in the downloaded file, but the file outputs as text directly to screen instead of downloading as it did previously.

    I notice that you mentioned "to screen and to file", when what appears onscreen is supposed to be downloaded while the Orders Export admin page remains unchanged onscreen.
    Last edited by gjh42; 23 Jul 2014 at 04:18 AM.

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

    Default Re: Keepalive Timer and Orders Exporter conflict

    Quote Originally Posted by gjh42 View Post
    After Keepalive installation, I do not get the code inserted in the downloaded file, but the file outputs as text directly to screen instead of downloading as it did previously.

    I notice that you mentioned "to screen and to file", when what appears onscreen is supposed to be downloaded while the Orders Export admin page remains unchanged onscreen.
    By "to screen and to file" I meant that I tested both types of output from the module ... as there are two columns of possible output choices, one for to-screen and one for to-file.

    I also observed identical behavior with and without the Keepalive module installed.

    A moment ago I noted that RixStix is engaged in discussion in another thread where odd symptoms are occurring because he (or maybe it's only others in that thread) is using PHP in FastCGI mode.
    I did not test your Order Exporter in FastCGI mode.
    .

    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
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Keepalive Timer and Orders Exporter conflict

    DrByte,

    Did you use your version of keepalive or the current Numinix version available in plugins? (maybe the difference is inconsequential)

    The plugin instructions say to modify one file as listed in the instructions, but I didn't see a file listed, nor edit to be made.

    INSTALLATION IS SIMPLE: 1. Unzip and upload the files. 2. Make a small addition to one existing file. See the enclosed Instructions.txt file.

    Now that I am back from a weeklong trip, I can use a vanilla 1.5.3 install for a test.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

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

    Default Re: Keepalive Timer and Orders Exporter conflict

    Haven't used the numinix one. I just looked at it, and they butchered the documentation and their code changes will break on v1.5.2, v1.5.3, and newer. Don't use it.
    .

    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.

  8. #8
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Keepalive Timer and Orders Exporter conflict

    TNX DrByte,

    I would have sworn that it was labeled for 1.5.2 & 1.5.3. Doesn't make much sense for the current version to be a downgrade from previous. That just reminded me why I have avoided Numinix modules in the past.

    I'll try your version later today or tomorrow with Glenn's order export RC. Still playing catchup after being out of town for a week.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  9. #9
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Keepalive Timer and Orders Exporter conflict

    Removed the numinix version. Installed the previous DrByte version.

    Since v1.5.3 code in /admin/includes/header.php has this line second from the bottom
    Code:
    <?php if (file_exists(DIR_WS_INCLUDES . 'keepalive_module.php')) require(DIR_WS_INCLUDES . 'keepalive_module.php'); ?>

    I did not add this line as listed in step2 of the keepalive instructions
    Code:
    <?php require(DIR_WS_INCLUDES . 'keepalive_module.php'); ?>
    OrdersExport and KeepAlive seem to be playing nice with each other.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

 

 

Similar Threads

  1. v151 Admin Keepalive Timer [Support Thread]
    By DrByte in forum Addon Admin Tools
    Replies: 78
    Last Post: 7 Apr 2019, 03:49 PM
  2. v154 Will Admin Keepalive Timer work with v154?
    By SilverHD in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 2 Jun 2015, 03:19 PM
  3. v151 question about installing Admin Keepalive Timer Addon
    By SilverHD in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 30 Nov 2014, 11:08 PM
  4. Admin Keepalive timer
    By alhakeem2001 in forum Customization from the Admin
    Replies: 5
    Last Post: 22 Dec 2013, 05:12 PM
  5. v139h with Orders Exporter can I export only recent orders?
    By kbrown in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 29 Sep 2012, 02: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