SMF Support > SMF 2.0.x Support
Moved to subfolder and images not loading
Rommeo:
--- Quote from: MrPhil on May 16, 2012, 12:46:47 PM ---What URL are your missing images using? Does it not include the /forums in their path? Have you ever run the repair_settings? Is everything in Settings.php set up for /forums?
Your /index.php will do nothing to fix file requests (such as images) which are still looking for a forums-less path. I would suggest getting rid of /index.php and using my .htaccess code to do the URL rewriting, which will also fix any paths still using the old path (no /forums). This assumes you're on an Apache server. If it's IIS, you may be able to install some module to make it read .htaccess files, or accomplish the same thing with some other kind of configuration file.
--- End quote ---
I have checked the urls from db and compared it with the working urls. everything is correct. since new images are working compared it with the links of old images which are not working. it s same url. nothing wrong.
As I know what I m doing, all folders and everything are correct too. repair_script could not find any error too.
I have tried the .htaccess way, It s not working also.
new images are working right, old ones are not loading. when you save, size is the same but not opening. its name is something like : 106_2c52ead1b6bf0089035c296ba84065f1edbab90b in db, file size is 50 kb, when you download it s also 50 kb, but when you open nothing in it. it says "creating thumb" but nothing at all. when you look at the posts, there is just gap there, empty image with size more than 0.. none of the images are working which are old ... really need help.
MrPhil:
If new images (added since the move) are working, that means the old ones still have an old path stored somewhere. Repair_settings may or may not fix these in all cases. Look in your browser at the "properties" of the images that fail to display and those that do display. If those that fail to display are missing /forums in their path, the .htaccess fix should work. Are you on an Apache server? Is your .htaccess otherwise working (it's in the root /, it's got 644 permissions, etc.). If the old ones show /forums in their path, the problem is somewhere else.
How exactly did you move the files from the root to /forums? Did you use FTP at any point? It's possible that you botched it by transferring in "ASCII" mode rather than "binary". If you used an FTP client in "automatic" mode selection, it may not have realized that these were image files and transferred them in ASCII mode. The only fix will be to go back to the original working files and transfer them again, being careful to force "binary" mode. I'm afraid that any image file previously transferred in the wrong (ASCII) mode is permanently ruined.
Rommeo:
yeah !
MrPhil you solved the problem !
it was ASCII I was using, most prob it's cause of that.
Rommeo:
possible to fix the files? like converting these ASCII files to binary and upload it again?
MrPhil:
It's usually not possible to fix a corrupted image file, once it's been FTP'd in ASCII mode. You'll have to go back to the originals, if you still have them in a site backup (which of course you made before doing the move, right?).
If you're very very lucky, and there was no mix of both x0D0A sequences and x0A bytes in the original file(s), reversing the transfer might fix it. However, that very rarely happens.
How tragic that you didn't simply use your hosting control panel > file manager to move the top level SMF directories down one level, and then the SMF root files down one level. Usually that can be done.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version