coppper6 Posted September 11, 2003 Posted September 11, 2003 hi, i see in the demo every manufacturer has a folder in the images folder. but when i adding products i have no chance to add to a different folder rather than images folder's root. i want to add images to respective manufacturer's folders. how can i do this? i tried this and no success: without uploading a document i directly wrote the microsoft/msimpro.gif. it gave me error saying that upload is not successful and the image is not showed. thanks a lot
coppper6 Posted September 11, 2003 Author Posted September 11, 2003 Warning: move_uploaded_file(/home/site/catalog/images/matrox/20047.jpg): failed to open stream: Permission denied in /home/site/catalog/admin/includes/classes/upload.php on line 94 Warning: move_uploaded_file(): Unable to move '/tmp/phpSs2r4b' to /home/site/catalog/images/matrox/20047.jpg' in /home/site/catalog/admin/includes/classes/upload.php on line 94 i saw that in a bug filed about this ( http://www.oscommerce.com/community/bugs,1278 ). i sthere any solution to this problem? 92 if (substr($this->destination, -1) != '/') $this->destination .= '/'; 94 if (move_uploaded_file($this->file['tmp_name'], $this->destination . $this->filename)) { 95 chmod($this->destination . $this->filename, $this->permissions); does explicitly declaring destination variable help?
coppper6 Posted September 12, 2003 Author Posted September 12, 2003 please help i'm stuck i have over 2000 products without folders it will be a nightmare to upload all those to only one folder. please help me lots of thanks in advance
paulm2003 Posted September 12, 2003 Posted September 12, 2003 Hi Lee, I found this: I have scoured this forum to find out how to create a directory structure to upload category and product images to under catalog/images. Most of the information posted is erroneous for flat out wrong. However I did find a reference to doing this at the followiing link: http://wiki.oscommerce.com/helpHowtoUploadImages The help document states that this doesn't work with 2.2ms2, but it does. I have tested it and found it to work perfectly. What's more it solves many problems when a store has thousands of categoried products. I am using Linux and Apache so I can't say if it works with Windows, but I suppose it would. --Dave :P Hope this helpes you. Can you notify me if it works? That all images go to catalog/images without subfolders is indeed very irritating. It even looks like a bug to me. :x Paul
MeMadMax Posted September 12, 2003 Posted September 12, 2003 Hi, Is this a add-on... upload to manufacturer folder / images folder when I add a product I can pick a image to upload but I do not see any option that I can pick where it is uploaded to... Any help would be appreciated, I do not want to dump all the photos into one images folder Thanks, Jim -------------------------------------------------------------------------- How can you tell when your out of invisible ink? Of all the things I've lost, I miss my mind the most!
Guest Posted September 12, 2003 Posted September 12, 2003 Just a point - I have 2200+ images all in one folder and it doesn't create problems for me at all. Why would it?
coppper6 Posted September 13, 2003 Author Posted September 13, 2003 paulm2003 thanks for your kind help. however, it does not work. i tried every possible combination. my configuration is redhat linux, apache web server, mysql 3.23.53 and php 4.3.2. do you have anyother solution? aren't there any mod or admin to help us this situation?? JulieCSM: mine is a computer retail site. so everything changes very qucikly. every month many product lines change. so deleting and uploading new ones are often. but if it were static the you're right.
coppper6 Posted September 13, 2003 Author Posted September 13, 2003 it's clearly a bug of new upload class. maybe developers have a solution for this problem. we all MS2 users are waiting for them to solve this problem. is there a possibility for using another upload class or function or something else for escaping this bug?
paulm2003 Posted September 13, 2003 Posted September 13, 2003 Hi Lee, I tried the instructions at: http://wiki.oscommerce.com/helpHowtoUploadImages Using linux/apache/MySQL/PHP (don't know exact versions) and osC2.2 MS2. And it worked, not perfect, but it might be usefull. I did the following 1) created a folder in picturestest on my PC at put in tst.png 2) created a folder catalog/images/test set it to 777 on the server 3) followed the instructions (at http://wiki.oscommerce.com/helpHowtoUploadImages). example : =>upload picture from >c:picturestest/tst.png 4) admin says upload is succesfull, but shows no picture 5) on the server is an image /test/test.png size 0 bytes 6) uploaded test.png with ftp programm overwrite the empty tst.png 7) ready Not all these steps might be needed, setting the folder to 777 might be a bad idea, only did this for testing. demo at (temporary), the properties of the pictures show the (sub)folder http://www.televisiedokter.nl/catalog/inde...php?cPath=21_23 To make a long story short: 1)First create the folders on PC and host 2)Then create the links using catalog/admin 3)And finally upload the picture with ftp Hope this helps until there is a bugfix
coppper6 Posted September 14, 2003 Author Posted September 14, 2003 paul, thanks again for your help. let me describe the situation: 1. i uploaded the image to a4tech/mouse directory and changed that dir's permission to 777. i then go to admin area and tried it was successful. but it's not a great idea to chmod all dirs 777. 2. now everything is fine. i changed that dir to 775 and tried again (from the admin area) again file upload is successful. then did the same for 755 and surprisingly it's again successful upload. 3. i tried to reproduce this strange thing sometimes i succeded sometimes not. 4. C:\oscommerce\catalog\images\dvd/action\movie.jpg i tried also this. again it was successful but it does not properly show the place of the image file (which is just under the image). i reproduced this several times. the only catch is it does not show correct place of the image. clearly what i have found from my experiments is that upload class is full of bugs and needs a re-writing.
Guest Posted September 14, 2003 Posted September 14, 2003 Hi, It must be that all the images must be in the same folder on your harddrive as the Internet and the permissions are set correctly. I changed the info at wik: http://wiki.oscommerce.com/helpHowtoUploadImages Please checkout and let me know if you have any problems with this. Thanks! ;)
coppper6 Posted September 15, 2003 Author Posted September 15, 2003 modom, i did exactly what you've written still it gives error. (exception is that once you add the product image with chmod 777 and then for experimental purposes change back to 755 it sometimes uploads and sometimes give upload error) when i chmod to 777 it's successful. again i'm saying upload class does not behave consistently. 777 is not a good idea anyway. modom are you a developer of oscommerce?
Guest Posted September 15, 2003 Posted September 15, 2003 No, I'm not a developer. The errors that I got before were from admin/includes/classes/upload.php on line 94 if that helps any.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.