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

EasyPopulate - suddenly having upload problem - See Error

This is a discussion on EasyPopulate - suddenly having upload problem - See Error within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; Friends, Here's the latest - I was uploading to my heart's content, until... I don't have A CLUE what happened.. ...

      
  1. #1
    New Member
    Join Date
    Jun 2004
    Posts
    23
    Rep Power
    0


    Default EasyPopulate - suddenly having upload problem - See Error

    Friends,

    Here's the latest - I was uploading to my heart's content, until... I don't have A CLUE what happened.. I have tried reuploading the original files from a fresh osC MS2max install and it isn't fixing.. Any ideas? Is it possible that there error is due to the content in the txt file I am trying to upload? (I'm uploading a .txt file from local.)
    __________________________________________________ _______
    Easy Populate 2.61-MS2 - Default Language : English(1)

    Warning: move_uploaded_file(/home/cafeprod/public_html//temp/Upload_withnoDecimals-Weight.txt): failed to open stream: Permission denied in /home/cafeprod/public_html/admin/easypopulate_functions.php on line 32

    Warning: move_uploaded_file(): Unable to move '/var/tmp/phplUDUez' to '/home/cafeprod/public_html//temp/Upload_withnoDecimals-Weight.txt' in /home/cafeprod/public_html/admin/easypopulate_functions.php on line 32


    File uploaded.
    Temporary filename: /var/tmp/phplUDUez
    User filename: Upload_withnoDecimals-Weight.txt
    Size: 1360399

    Warning: file(/home/cafeprod/public_html//temp/Upload_withnoDecimals-Weight.txt): failed to open stream: No such file or directory in /home/cafeprod/public_html/admin/easypopulate.php on line 720

    Warning: Invalid argument supplied for foreach() in /home/cafeprod/public_html/admin/easypopulate.php on line 738



    Upload EP File


    Any ideas are most appreciated...

    __________________________________________________
    My easypopulate_functions.php file (at public_html/admin)

    <?php
    function tep_get_uploaded_file($filename) {
    if (isset($_FILES[$filename])) {
    $uploaded_file = array('name' => $_FILES[$filename]['name'],
    'type' => $_FILES[$filename]['type'],
    'size' => $_FILES[$filename]['size'],
    'tmp_name' => $_FILES[$filename]['tmp_name']);
    } elseif (isset($GLOBALS['HTTP_POST_FILES'][$filename])) {
    global $HTTP_POST_FILES;

    $uploaded_file = array('name' => $HTTP_POST_FILES[$filename]['name'],
    'type' => $HTTP_POST_FILES[$filename]['type'],
    'size' => $HTTP_POST_FILES[$filename]['size'],
    'tmp_name' => $HTTP_POST_FILES[$filename]['tmp_name']);
    } else {
    $uploaded_file = array('name' => $GLOBALS[$filename . '_name'],
    'type' => $GLOBALS[$filename . '_type'],
    'size' => $GLOBALS[$filename . '_size'],
    'tmp_name' => $GLOBALS[$filename]);
    }

    return $uploaded_file;
    }

    // the $filename parameter is an array with the following elements:
    // name, type, size, tmp_name
    function tep_copy_uploaded_file($filename, $target) {
    if (substr($target, -1) != '/') $target .= '/';

    $target .= $filename['name'];

    move_uploaded_file($filename['tmp_name'], $target);
    }


    __________________________________________________ _________
    Now.. line 738 from the easypopulate.php file at public_html/admin

    // now we string the entire thing together in case there were carriage returns in the data
    737~ $newreaded = "";
    738~ foreach ($readed as $read){
    739~ $newreaded .= $read;
    }

    // now newreaded has the entire file together without the carriage returns.
    // if for some reason excel put qoutes around our EOREOR, remove them then split into rows
    $newreaded = str_replace('"EOREOR"', 'EOREOR', $newreaded);
    $readed = explode( $separator . 'EOREOR',$newreaded);



    OH.. and also, I have set permissions on both of these files as well as the easypopulate.php found at root/easypopulate/EP_v2_74_MS2/catalog/admin/easypopulate.php to 777.

    Thanks - will await your brilliance and continue to absorb

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default

    Warning: move_uploaded_file(/home/cafeprod/public_html//temp/Upload_withnoDecimals-Weight.txt): failed to open stream: Permission denied

    Said it all - MAKE sure the file and DIRECTORY has the correct permissions also!
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    New Member
    Join Date
    Jun 2004
    Posts
    23
    Rep Power
    0


    Default

    Quote Originally Posted by jpf
    Warning: move_uploaded_file(/home/cafeprod/public_html//temp/Upload_withnoDecimals-Weight.txt): failed to open stream: Permission denied

    Said it all - MAKE sure the file and DIRECTORY has the correct permissions also!
    Indeed, permissions were set to 755 for a single directory and it would seem that was one of the two issues..

    What accompanied the fix was the following:

    When we set up the osc directories, we chose not to use catalog/ anything.. WELL EasyPopulate doesn't like that and although I am sure you can modify the EP files to reflect whatever directory structure chosen, I haven't a clue where to make all these mods.. So, I gave in and created a "catalog" folder at public_html and put the "temp" folder EP used to use inside the catalog folder, thus making the path (public_html)/catalog/temp and what do you know, afterreuploading the stock ep~.php files, it works!!

    Gosh - and all because I wanted to make the directory structure look the way I WANTED IT..


    Anyway, so my latest issue is my model numbers are too long..

    I have set the products_model field in my db to reflect a max length of 255 (and I've tried a random 40 too, just in case 255 was unrecognizable for some reason) and I am still getting an error when uploading through EP for any products with a model # greater than 15 characters (and 15 is the limit osC/admin/EP is reporting).. I am stumped, and ready to just modify all my product numbers.. Any ideas? What did I miss?

    Thanks -

    __________________________________
    ERROR! - Too many characters in the model number.
    12 is the maximum on a standard OSC install.
    Your maximum product_model length is set to 15
    You can either shorten your model numbers or increase the size of the field in the database.

    and yet I've tried changing in php myadmin to:

    products_model varchar(40) Yes NULL Change Drop Primary Index Unique Fulltext

    products_model varchar(255) Yes NULL Change Drop Primary Index Unique Fulltext

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    You also have to set $modelsize to 255 in easypopulate.php
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  5. #5
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default

    Also you have a double / in the file name... check paths....

    Invaild: /home/cafeprod/public_html//temp/

Similar Threads

  1. not so 'easy populate', upload error
    By danhosts in forum osCmax v2 Installation issues
    Replies: 5
    Last Post: 09-29-2006, 12:28 PM
  2. easypopulate problem
    By mcilpuf in forum osCmax v2 Installation issues
    Replies: 0
    Last Post: 09-23-2006, 04:20 PM
  3. Having to change image name to upload problem
    By ozstar in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 02-26-2006, 11:47 PM
  4. Yep another person with an image upload problem
    By Kragon8331 in forum osCMax v1.7 Installation
    Replies: 3
    Last Post: 12-14-2004, 07:52 AM
  5. Easy Populate v2.74 - Dwonload/Upload 1054 error
    By deekins in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 11-13-2004, 03:37 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
  •