News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Attachments not working after 2.1 large upgrade

Started by MarkoKg, June 21, 2024, 03:27:45 AM

Previous topic - Next topic

MarkoKg

Hello all!

I did a large upgrade for my 2.0.x forum and it's upgraded to 2.1 now. Upgrade went smoothly without any errors reported, and my forum seems to be working fine now, in all aspects apart from the attachments.
Each attachment that I try to open is not working- it's showing white page with error: File not found.

I have a huge attachment directory, around ~30GB of mainly images and stuff, and from what I can see - upgrade seems to add some sort of .dat files into my attachments directory. See attached printscreen. Is that normal?

Also in my error log, after trying to open attachment, i got this errror:
Admin
212.200.80.129
364bba0ed10fb4f063f038cdc10c873c
https://myforumurl.net/forum/index.php?action=dlattach;topic=29020.0;attach=101679;image
/home/admin/web/myforumurl.net/public_html/forum/Sources/Subs.php (Line 5137)
Backtrace information

Type of error: General
Error message Select
8: Array to string conversion

Any suggestions about what to do next please? I'm lost and not sure if I should run the upgrade again? I'm afraid because the attachments folder is so big, maybe that is a bit too much for upgrade script to process all at once?

Thanks!

Sir Osis of Liver

2.1 upgrade adds a .dat extension to all attachment filenames.  From your screenshot looks like it missed a lot, probably because your /attachments directory is huge.  (It's a really bad idea to have that many attachments in one directory, but that's a different issue.)  The attached script (if I can find it) will add the .dat extension to files that don't have it.  See if that fixes the problem.

Even if the whole world has forgotten,
The song remembers when.

                              - H. Prestwood

Kindred

Sir Osis -- check the image again....   the converter didn't MISS any -- it created the .dat versions - but never removed the (no extension) versions
Сл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."

Sir Osis of Liver

Uh, oh, didn't see that.  That's a first, afaik.  What I would do is rename /attachments to /attachments_sav, then upload /attachments from 2.0 backup (assuming OP has one), then run the script.  Would guess server choked on 30 gb directory.  Wonder if upgrade completed otherwise?

Might not be a bad idea to restore 2.0 forum, make sure everything's working, rename /attachments directory, create new empty directory, run 2.1 upgrade, upload 2.0 attachments to 2.1 install, run script.  Upgrade does not add .dat extension to file_hash in database, it's added on the fly when attachment is called, so that should work.
Even if the whole world has forgotten,
The song remembers when.

                              - H. Prestwood

Advertisement: