After Upgrade to SMF 2.1.3: Attachments cannot be displayed

Started by andrea2014, March 14, 2023, 06:00:14 AM

Previous topic - Next topic

andrea2014

Hello all,

I just did the upgrade to 2.1.3. Upgrade was without any error.
Also no errors in smf Admin Center.

It is only a very small forum, without any modifications installed, also the theme is left default.
I did not change any directories, just made the upgrade.

Smileys and Avatars are working but attachments cannot be displayed.
I can upload new attachments, when writing a post and the files are stored in the attachments directory but also these new files cannot be displayed.

I did an integrity check in Administration and there are no problems.

I need to say, that before the upgrade I had a charset-problem (latin1 and utf8) after my provider updated linux.
The website could not display öäü any more, but I was able to fix this by adding $db_character_set = 'latin1'; to Settings.php.

As during the upgrade the database was converted to utf8 and thereafter all text on the forum website looks clean still, this problem should be solved, I think.

Before updating my online smf forum I set up a copy of it on a local system, upgraded it and this local smf displays all attachments.

Perhaps it is only a little setting somewhere?
Would be great if you had an idea and could give me a hint.

Thanks a lot in anticipation!
Best wishes

Andrea


andrea2014

Thankyou for the swift reply. Since the upgrade all attachments have .dat extension.
I also compared the attachment sizes to those on my local system and could not find a difference. It all looks the same.
Attachment folder is in use and also new attachments saved to that directory have .dat extension, but they cannot be displayed on the forum website.

Crazy problem.

Doug Heffernan

Quote from: andrea2014 on March 14, 2023, 06:29:13 AMThankyou for the swift reply. Since the upgrade all attachments have .dat extension.
I also compared the attachment sizes to those on my local system and could not find a difference. It all looks the same.
Attachment folder is in use and also new attachments saved to that directory have .dat extension, but they cannot be displayed on the forum website.

Crazy problem.


Are the attachments paths and urls poiting to the right location? You can use What is repair_settings.php? for checking.

Kindred

Although it has nothing to do with attachments --- SMF 2.1.x no longer runs latin1 - everything is UTF8... so your action is incorrect.  The fact that you have issues indicates that the upgrade did not run fully or correctly, since everything should have been converted to UTF8 in both the display and the database.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

andrea2014

repair_settings.php did not change the problem. Directories are fine.
I'll try a new setup using my local working installation and will let you know the result.

Thankyou for your ideas.

Best wishes

Andrea


andrea2014

I dumped my working local smf database, copied the local smf files and set all up online using a new database.
Result: all the same, attachments cannot be displayed!

The .htaccess File in directory attachments is part of smf?

Difference to my local system is only https instead of http.

Perhaps I'll do a completely fresh install to check if the problem exists there, too.

Bes wishes

Andrea


andrea2014

I now did a clean install of a fresh standard smf - no database import and no old files.
This time also only http:// and the problem is the same as before: uploading attachments works, displaying on the website is not possible.

So it has nothing to do with my old data and old files.

I even set attachment directory and the test-attachments to 777 and it makes no difference.

Would be happy, if someone has any further ideas.
My provider is df.eu [nofollow]

Best wishes

Andrea

andrea2014

When I click on the attachment-links in forum posts I get ERR_EMPTY_RESPONSE

Aleksi "Lex" Kilpinen

Can you check your server error logs? What happens, if anything, when you get that error?
ERR_EMPTY_RESPONSE basically means "I yelled, but got nothing back" - So there is something definitely wrong somewhere.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

andrea2014

I have limited access to log files and the files I was able to check seem to be "empty".

Sources/ShowAttachments.php should display the attachments.
How can I debug this file to show the error messages on the display instead of only logs (if they are logged)?

ini_set("display_errors", 1);  did not help.
Perhaps the send_http_status(..)  prevent this way?

Thankyou for your ideas.

Best wishes

Andrea

Aleksi "Lex" Kilpinen

I'm afraid you can't really add anything to a page that doesn't exist - The error is your browser telling it didn't receive anything from the server, and if SMF was able to present something at least, the error should be different. I'm guessing that's likely a 500 error, that should be logged on server side, and the logs should tell you more about what happened.

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

andrea2014

My provider had a solution:

I had to put a .htaccess in the main directory of the forum which has the following in it:
RequestHeader unset Range

All attachments now display  :D  :D  :D

Hope this may help others in a similar situation.

Anyway thanks for your efforts!
Best wishes

Andrea

Advertisement: