Guest Posted December 27, 2003 I uploaded a clean version of oscommerce to my webserver and added Easy Populate to it. When trying to upload "complete tab-delimited.txt " file , the same file as was downloaded this is the error I get. Warning: move_uploaded_file(/home/pcpulse/public_html/catalog/catalog/temp/EP2003Dec28-1111.txt): failed to open stream: No such file or directory in /home/pcpulse/public_html/catalog/admin/easypopulate_functions.php on line 32 Warning: move_uploaded_file(): Unable to move '/tmp/phplijxYg' to '/home/pcpulse/public_html/catalog/catalog/temp/EP2003Dec28-1111.txt' in /home/pcpulse/public_html/catalog/admin/easypopulate_functions.php on line 32 File uploaded. Temporary filename: /tmp/phplijxYg User filename: EP2003Dec28-1111.txt Size: 80020 Warning: file(/home/pcpulse/public_html/catalog/catalog/temp/EP2003Dec28-1111.txt): failed to open stream: No such file or directory in /home/pcpulse/public_html/catalog/admin/easypopulate.php on line 644 Warning: Invalid argument supplied for foreach() in /home/pcpulse/public_html/catalog/admin/easypopulate.php on line 667 I have looked at the line numbers and can't see anything // get the entire file into an array $readed = file(DIR_FS_DOCUMENT_ROOT . $tempdir . $usrfl_name); } if ($localfile){ // move the file to where we can work with it $file = tep_get_uploaded_file('usrfl'); $attribute_options_query = "select distinct products_options_id from " . TABLE_PRODUCTS_OPTIONS . " order by products_options_id"; $attribute_options_values = tep_db_query($attribute_options_query); $attribute_options_count = 1; //while ($attribute_options = tep_db_fetch_array($attribute_options_values)){ if (is_uploaded_file($file['tmp_name'])) { tep_copy_uploaded_file($file, DIR_FS_DOCUMENT_ROOT . $tempdir); } echo "<p class=smallText>"; echo "Filename: " . $localfile . "<br>"; // get the entire file into an array $readed = file(DIR_FS_DOCUMENT_ROOT . $tempdir . $localfile); } // now we string the entire thing together in case there were carriage returns in the data $newreaded = ""; foreach ($readed as $read){ $newreaded .= $read; } // 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); } Any help would be great Thanks Rich Share this post Link to post Share on other sites
Guest Posted December 28, 2003 chmod 777 your temp directory Matti Share this post Link to post Share on other sites
Guest Posted December 28, 2003 Thanks , I have done that but still get these errors. ??? Warning: move_uploaded_file(/home/pcpulse/public_html/catalog/catalog/temp/EP2003Dec28-1111.txt): failed to open stream: No such file or directory in /home/pcpulse/public_html/catalog/admin/easypopulate_functions.php on line 32 Warning: move_uploaded_file(): Unable to move '/tmp/phpFmh9Fj' to '/home/pcpulse/public_html/catalog/catalog/temp/EP2003Dec28-1111.txt' in /home/pcpulse/public_html/catalog/admin/easypopulate_functions.php on line 32 File uploaded. Temporary filename: /tmp/phpFmh9Fj User filename: EP2003Dec28-1111.txt Size: 80020 Warning: file(/home/pcpulse/public_html/catalog/catalog/temp/EP2003Dec28-1111.txt): failed to open stream: No such file or directory in /home/pcpulse/public_html/catalog/admin/easypopulate.php on line 644 Warning: Invalid argument supplied for foreach() in /home/pcpulse/public_html/catalog/admin/easypopulate.php on line 667 I have looked at the lines there's eroes on , but can't find any. Rich Share this post Link to post Share on other sites
Guest Posted December 28, 2003 Look for the line where it sets the temp directory and change '/catalog/temp/' to '/temp/' or '/catalog/temp' to '/temp' (depending on what's on that line). Hth, Matt Share this post Link to post Share on other sites
Guest Posted December 28, 2003 Thanks, but that hasen't fixed it either. Have you installed this script before ?? Cos it's got me stuffed. Thanks Rich Share this post Link to post Share on other sites
Guest Posted December 28, 2003 You have an extra 'catalog' in the path: /home/pcpulse/public_html/catalog/catalog/temp/EP2003Dec28-1111.txt This is a file system path, so look at these - in both your configuration file and the contribution. Matti Share this post Link to post Share on other sites