Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2016
Posts: 5
S
Stranger
Stranger
S Offline
Joined: Oct 2016
Posts: 5
All of a sudden, attached images are not displaying and we're getting the broken link icon. What should I check?

Thanks,
John


John
Joined: Jun 2006
Posts: 16,301
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,301
Likes: 116
Are you logged in? I see you have download perms set to not allow guests, instead they get the message "You do not have access to download this attachment" such as here from here


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2016
Posts: 5
S
Stranger
Stranger
S Offline
Joined: Oct 2016
Posts: 5
Hi Gizmo. Thanks. I am logged in. I see what you are showing me.

BTW, our usual guy who handles this (Baldeagle) is offline currently -- probably dealing with flooding in his hometown of Richardson, TX. I am not as conversant with all of this as he is, so your patience is appreciated smile

I checked a random forum and the permissions seem to be set as they should be ... I tried your first link to my site and I get the message that the image attempting to display contains errors. You might have to hold my hand through this...


John
Joined: Oct 2016
Posts: 5
S
Stranger
Stranger
S Offline
Joined: Oct 2016
Posts: 5
We haven't allowed guests to view images all along. Even for logged in users, images are showing up as broken link icons


John
Joined: Dec 2003
Posts: 6,566
Likes: 78
Joined: Dec 2003
Posts: 6,566
Likes: 78
I would start with validating the files are accessible.
First is in the UBB CP go to the attachment section and use the test link to make sure the folder can be accessed.

Try typing a direct path in a browser to a attachment file.not using UBB.
The clickable links in a post are not direct links. They access to database first and alter the URL.
I assume you have not added a htaccess entry to prohibit that.
You can find the direct path to a file using say a ftp program unless you know it.

Next I would FTP download a attachment file to see if you can open it on your hard drive.
Maybe the files are corrupted?

If that all looks to be okay then it probably is something corrupted the the ubbt_files table

Also I would try adding a test topic with a new attachment to see if that works.

One last thing is your includes/config.inc.php file may be corrupted for allowed file types.
ftp to the site and look at that file.
Yes you can look in the UBB CP but it may cache old settings even though the actual file is missing types, so if you go that route if it looks okay still save to update the config file.;

Look at a current post
https://www.ubbcentral.com/forums/u...is-not-a-bug-but-a-suggestion#Post266016

Last edited by Ruben; 05/05/2024 3:16 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Oct 2007
Posts: 363
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 363
Likes: 8
Hey Ruben, thanks for trying to help. We have a problem with our server that I have not been able to figure out. For some reason, the perms on the attachments folder (named uploads) get changed at completely random and inexplicable intervals (one week, two months, three days), and it breaks all the images. As soon as I am notified of it, I login to the server and reset the perms, and everything is fine again.

Unfortunately, this time, that didn't work for all the images. For example, if you view this page: https://www.stovebolt.com/ubbthreads/ubbthreads.php/topics/1545953/re-1966-w-250.html#Post1545953

you will notice that the first two posts in the thread have visible images, but in the last post all the images are broken.

The problem that i have is I don't understand how to convert from the user-input filename to the program-generated filename. So, it's difficult for me to determine if those files aren't on the server or have incorrect permissions.

Last night, I both chown'd and chmod'd the directory, so I suspect those files never made it to the uploads directory for some reason. (Perhaps the permissions change made the directory inaccessible or unwritable.)

If there is a way to determine how the filename gets converted, I could investigate one or more of them to see if they are anywhere on the server, but since the perms and ownership are known to be correct today, I suspect the files are gone and will have to be re-uploaded.

Unfortunately, our OS doesn't allow me to find the birth time of files:
Code
uploads]# find . -newerBT "5 May 2024"
find: This system does not provide a way to find the birth time of a file.
find: invalid predicate `-newerBT'
And all the files how a mod date and time of when I changed ownership and permissions, so I'm out of ideas.

UPDATE: All I had to do was edit a post, then save it, and the pictures reappeared.

Last edited by Baldeagle; 05/05/2024 4:26 PM.

The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Dec 2003
Posts: 6,566
Likes: 78
Joined: Dec 2003
Posts: 6,566
Likes: 78
Then You might want to consider running the posts and the topic re builders to catch all of them if you know the permissions are correct now.
Since you have a old site many posts it will take a while to complete.

To translate the urls you need to open the files table in the database and search for ubb's link.

I do not know what to say about the permission changes, I know many years ago it was a issue due to server upgrades or transferring to a new host, but I hardly hear of that happening anymore.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
1 members (Ruben), 381 guests, and 264 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)