hankfrid Posted May 24, 2003 Posted May 24, 2003 Here's what I have: Snapshot from 20030514 Retrofitted Sm,Md,Lg Images for snapshot Directory for catalog/images is set to 755 Most images that I reloaded from previous snapshot have 644 permissions (my product pictures and all). The contribution allows small medium and large images for products. When I add images thru the "Browse" function (in Admin) for all three sizes, it seems that it adds the small image (normal image for snapshot) to the images folder with permission of 777, but the newly added medium and large image files are added with 644. I go to a different location (where my business is during day) and thru my laptop (separate PC from home) I might admin in to look for orders, new customers, product updates etc. Then, spastically and sporadically, some images just stop showing up and I get empty boxes with the "x". When I go and look thru CPanel at these files (and via FTP to look at them), I see that it still exists in the image folder, but the permission is 777 (I think it always was) and the file size is now zero(0) bytes. It's been cleared out. I've had to delete, clear cache, and re-add the pics via product update to repull them from my hard drive. If I just FTP them up, it doesn't fix them. Questions: When product images are loaded to the images folder, what should the file permissions be? Where are the file permissions for image files set? I see in the upload.php program that it sets a default value of 777. Apparently for my medium and large images, a 644 is being passed to override the 777 default. But the normal small image is not, so it is defaulted to 777. I haven't been able to track where the actual permission value is set. But the only real program with heavy modifications in the contribution I applied is the admin/categories.php program, and when I search it for "permission", I get no hits. Any help in at least understanding the flow of this process and what the expected permissions are would be greatly appreciated. Oh, and I almost forgot. The files that are added with the 777 permission cannot be chmod thru CPanel File manager. It takes the change and says the permissions have been updated, but they still show 777. I don't know if that will mean anything to anyone, but it seems like it might be another important clue. Sorry this is so long. I've just tried to tell you what I've found in my legwork, rather than come out here and say "Pictures No Work, Fix Please?". I just need some help to go from here. Thanks, HankFrid If I build it...they will come. If I don't try to build it.....I will never know!
AG Posted May 24, 2003 Posted May 24, 2003 hankfrid, I don't know much about this SML pic contribution but I had a similar problem when I was sorting out my image folder and things were there but it wasn't showing up...never experienced this in the past 7 years!! Very odd. I did look into the db and changed the image path there. Could it be anything to do with that? Just throwing some idea for you. :?: AG
hankfrid Posted May 25, 2003 Author Posted May 25, 2003 I don't think its the path. I'm finding the image files, they just get cleared. After some investigation, I have found a little more info, not much. It looks like in March (around 21st) this year, a new class for file_upload was added. It is workboard #61. This enhancement added the upload.php to the admin/includes/classes folder and it sets the default permissions to 777. What I still don't know is why the normal image file gets loaded with 777, yet the two additionally added image files get 644. I haven't tracked it down. If you have a snapshot installed from say April 1st 2003 or more recent, could you tell me what permissions your catalog image files are getting when you add a product thru Admin and let it upload it from your hard drive??? If anyone knows where the actual numeric permissions field gets set for images added this way, please let me know. Thanks, HankFrid If I build it...they will come. If I don't try to build it.....I will never know!
Guest Posted May 25, 2003 Posted May 25, 2003 I've been having this problem too using a Feb loaded5. They're all set to 644 too. Making sure FTP is set to binary before transfering them seems to help, though not totally cure it. (even though ftp explorer is supposed to switch according to file type)
hankfrid Posted May 26, 2003 Author Posted May 26, 2003 I think 644 is what you want. The problem I have is some are being added with 777 as the permission and then getting cleared out to zero bytes later (seems when I'm on an older laptop I use). Have you had problems with 644 permissions? I think that should be the normal permission. Also, I seem to be fine when I upload images via SmartFTP. The problem is that normally I just use the Admin function to browse the image file on my hard drive and select it to be uploaded as part of adding a new product. HankFrid If I build it...they will come. If I don't try to build it.....I will never know!
Guest Posted May 26, 2003 Posted May 26, 2003 The permissions are as I loaded them. My problem is only with images which seem to load ok, but then show as empty or corrupted, sometimes after having been viewed online & seeming ok. At about the same time I also had a problem with some changes to stylesheet & default.php not showing. I reloaded an older version of those files & made the changes again & now I've only had one bad image, which then mysteriously righted itself & only a couple of the changes to the stylesheet are not showing. (fingers crossed for continued good behavior) Did you make any mods to the new snapshot?
hankfrid Posted May 27, 2003 Author Posted May 27, 2003 Yes, I have applied/retrofitted the Sm,Md,Lrg Image contribution to the snapshot. So when you say the permissions were as you loaded them, what is the ACTUAL value that they are loaded with? Is it 644? And are you only loading them via FTP, or do you "Browse" and select them from your hard drive during "New Product Setup" and let osCommerce pull it and load it to your "Images" folder? Thanks, HankFrid If I build it...they will come. If I don't try to build it.....I will never know!
hankfrid Posted May 27, 2003 Author Posted May 27, 2003 Sorry. I forgot to add that what you were describing with them being good and then all of a sudden going bad is exactly what I am experiencing. HankFrid If I build it...they will come. If I don't try to build it.....I will never know!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.