wider Posted September 18, 2002 Posted September 18, 2002 Dear Colleagues! I am very pleased with OSCommerce. Thanks to all the developers and contributors. I am trying to implement the Mo_Pics 1.1 contribution. Seem to work quite fine, but for the fact that the images are uploaded with the default permissions of my host CHMOD 600. So the images won't display. I've added to admin/categories.php: / copy image only if modified if ( ($products_image != 'none') && ($products_image != '') ) { $image_location = DIR_FS_CATALOG_IMAGES . $products_image_name; if (file_exists($image_location)) @unlink($image_location); move_uploaded_file($products_image, $image_location); chmod ($image_location, 0777); } else { $products_image_name = $HTTP_POST_VARS['products_previous_image']; } This works fine for the regular image and the big image (although the latter only displays in the catalogue) Now I tried to do exactly the same for the other copy sections: eg: // copy subimage1 only if modified if ( ($products_subimage1 != 'none') && ($products_subimage1 != '') ) { $subimage1_location = DIR_FS_CATALOG_IMAGES . $products_subimage1_name; if (file_exists($subimage1_location)) @unlink($subimage1_location); move_uploaded_file($products_subimage1, $subimage1_location); chmod ($subimage1_location, 0777); } else { $products_subimage1_name = $HTTP_POST_VARS['products_previous_subimage1']; That does NOT work and I get the debugging lines in the preview: Warning: chmod failed: No such file or directory in /kunden/seligmanfox.de/webseiten/looks/admin/categories.php on line 610 Warning: chmod failed: No such file or directory in /kunden/seligmanfox.de/webseiten/looks/admin/categories.php on line 610 What am I doing wrong? I am getting a bit despaired :( I'd appreciate your help!! Thanks loads!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.