osCmax v2.5 User Manual
Results 1 to 5 of 5

HELP!! Getting Errors When Trying To Use Easy Populate...

This is a discussion on HELP!! Getting Errors When Trying To Use Easy Populate... within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; HELP!! I've got tons of products that I need to upload like yesterday, and when I try to download my ...

      
  1. #1
    Lurker
    Join Date
    Nov 2004
    Posts
    2
    Rep Power
    0


    Default HELP!! Getting Errors When Trying To Use Easy Populate...

    HELP!!

    I've got tons of products that I need to upload like yesterday, and when I try to download my test product using Easy Populate (so I have a template to work from when uploading new products), it says Internet Explorer cannot open site.

    So, I tried just using the "Open In TEMP File" option, and I get the following errors on an error page:

    Warning: fopen(/home/motocros/public_html/members/teststore//temp/EP2004Dec01-1402.txt): failed to open stream: No such file or directory in /home/motocros/public_html/members/teststore/admin/easypopulate.php on line 590

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/motocros/public_html/members/teststore/admin/easypopulate.php on line 591

    Warning: fclose(): supplied argument is not a valid stream resource in /home/motocros/public_html/members/teststore/admin/easypopulate.php on line 592
    You can get your file in the Tools/Files under /temp/EPEP2004Dec01-1402.txt

    Please can someone help me out? I'm about to go crazy, because I've got time restrictions and need to get the store up (needed it up by today).

    Thanks a Million,
    MxTC

  2. #2
    Active Member red_fraggle's Avatar
    Join Date
    Feb 2004
    Location
    wilmington, NC
    Posts
    343
    Rep Power
    9


    Default

    problem is either:

    A: you have 2 "//" in the url which tells me in your configure.php file you have 2 "//" where there should only be one. see > /teststore//temp/EP2004Dec01

    B: chmod the temp folder to 777 so the easypopulate script can write the file to it before opening.

  3. #3
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default

    I have the same problem. Ever since my catalog has grown to about 1100 items, I have problems downloading from easy populate.

    The only fix I've found is to move from IE to firefox. For some reason firefox handles it but IE won't

    Give it a try, might work for you. Don't know why, but it works.

    GL!

  4. #4
    New Member
    Join Date
    Mar 2005
    Posts
    7
    Rep Power
    0


    Default

    I have found a fix for this. I too was having the problem where IE would error upon trying to download the easy populate csv. It seems Internet Explorer needs a different block of code for handling the creation of downloadable csv files:

    Here's the fix:

    Open /catalog/admin/easypopulate.php

    REPLACE:

    Code:
    //*******************************
    // STREAM FILE
    //*******************************
    header("Content-type: application/vnd.ms-excel");
    header("Content-disposition: attachment; filename=$EXPORT_TIME.txt");
    header("Pragma: no-cache");
    header("Expires: 0");
    echo $filestring;
    die();
    WITH:

    Code:
    //*******************************
    // STREAM FILE
    //*******************************
    $imh_filename = $EXPORT_TIME.'.csv';
    $imh_mime_type = 'text/x-csv';
    header('Content-Type: ' . $imh_mime_type);
    header('Expires: 0');
    if (strpos($_SERVER["HTTP_USER_AGENT"],'MSIE')!==false)
    {
    header('Content-Disposition: inline; filename="' . $imh_filename . '"');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    } else
    {
    header('Content-Disposition: attachment; filename="' . $imh_filename . '"');
    header('Pragma: no-cache');
    echo $filestring;
    die();
    Hope this helps.

  5. #5
    New Member
    Join Date
    Mar 2005
    Posts
    7
    Rep Power
    0


    Default

    Doing a bit more digging aroun, it seems there is an even easier fix for this. Download the new version of easy populate 2.76c from the osCommerce main site, and it has a fix in it that is only a few lines long.

    Basically, replace:

    Code:
    //*******************************
    // STREAM FILE
    //*******************************
    header("Content-type: application/vnd.ms-excel");
    header("Content-disposition: attachment; filename=$EXPORT_TIME.txt");
    header("Pragma: no-cache");
    header("Expires: 0");
    echo $filestring;
    die();
    with:

    Code:
    //*******************************
    // 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)
    //      header("Pragma: no-cache");
    if ($request_type== 'NONSSL'){
    header("Pragma: no-cache");
    } else {
    header("Pragma: ");
    }
    header("Expires: 0");
    echo $filestring;
    die();
    Man do I love wild goose chases! But if anyone is having trouble getting some other CSV download code to work, take a look above, becuase that is a sure fire fix.

Similar Threads

  1. Easy populate
    By countingsheep in forum osCmax v2 Installation issues
    Replies: 2
    Last Post: 06-26-2006, 01:18 PM
  2. easy populate errors
    By nieves74 in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 11-15-2005, 07:32 AM
  3. Easy Populate
    By lem in forum osCmax v1.7 Discussion
    Replies: 6
    Last Post: 12-07-2004, 02:28 PM
  4. Easy populate bug
    By test3be in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 03-29-2004, 02:01 AM
  5. How to use Easy Populate
    By judoka in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 07-07-2003, 09:47 AM

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
  •