News:

Wondering if this will always be free?  See why free is better.

Main Menu

Large Upgrade questions: 2.0.8 to 2.1.6

Started by richard168, July 03, 2025, 11:53:03 PM

Previous topic - Next topic

richard168

I have an old forum that has been operational for many years. As we are preparing to migrate to a new server, I am considering upgrading the SMF forum software from version 2.0.8 to 2.1.6. Here are my specific concerns and questions:

1. Is it necessary to perform this upgrade?

2. To safeguard the content of our old forum, I prefer not to upgrade directly on our old server (as I'm worried about potential data loss or system corruption). Instead, I intend to set up a new forum with SMF 2.1.6 and then transfer all accounts, posts, and related data to the new instance.
Could you provide a comprehensive guide on how to proceed? I've searched this official forum and relevant posts but haven't found a clear solution yet.

If it's too complicated, I hope I can at least save all the accounts and posts. As for other things like themes, settings, and attachments, if they are too troublesome, just forget them.



shawnb61

#1
1.  Yes.

2.  The upgrader is the tool that does this.

One possible approach... Make a fully working copy of the 2.0.8 forum:
 - db backup & restore to new db
 - file backup & restore to new location
 - ***RUN REPAIR_SETTINGS.PHP *** to get the forum working properly in the new location with the new db
 - pay special attention to attachments & avatars, make sure all folders are pointing to the proper NEW location
 - and they work

Once you have A FULLY WORKING INDEPENDENT COPY, with ABSOLUTELY NO SETTINGS POINTING TO THE OLD LOCATION, run the upgrader.  The upgrader is the proper tool to update the contents & make it suitable for 2.1.x.

You can repeat the above as often as you want on a test copy.

Once you have nailed the process down, I suggest you upgrade the 2.0.8 in place.  Consider all the internal forum links you have... You'd need data utilities to fix all that on a relocated forum.  If you have good backups, you're safe.

Read this for info & hazards with avatars & attachments: https://www.simplemachines.org/community/index.php?topic=591714.0

If you MUST run the upgraded forum in the new location, this might help:
https://raw.githubusercontent.com/sbulen/sjrbTools/refs/heads/master/smf_urls_paths.php
A question worth asking is born in experience & driven by necessity. - Fripp

pimps

Thanks, Shawnb61 that's super helpful detail. I'm in the same boat upgrading from 2.0.8 and was worried about attachments and paths. Appreciate the repair settings php reminder and those links for extra reading. Cheers!

richard168

hi, i tried to install 2.0.8 today, but no luck.
this is what i got.(pic in attachment)

more descriptions of my steps:

previously, i installed 2.1.6 successfully. aiming to import the backup database of 2.0.8.

after reading your suggestions, i removed 2.1.6 and the database in mariadb.

then i recreated an empty database, and tried to intall 2.0.8.

but got this critical error.




richard168

====a new attempt====

A. db backup&restore
1. backup:
use phpMyAdmin "export" to backup my forum database. file:smf-20250703.sql
2. restore
mysql -u forum_admin -p forum_db < /var/www/html/forum/smf-20250703.sql
there is no error here

B. file backup&restore
1. backup
tar -vcf forum.tar forum
then download it with sftp tool
2. restore
upload this tar file, and then extract it with:
tar -xcf forum.tar
3. change the folder owner to www-data
sudo chown -R www-data:www-data /var/www/html/forum
4. download repair_settings.php from smf website:
https://download.simplemachines.org/index.php?thanks;filename=repair_settings.php
and upload it to our server:  /var/www/html/forum/
try to run this php from my internet browser:
http://xx.xx.xxxx/forum/repair_settings.php
===========error occurs, this is the output============
This page isn't working
xx.xx.xx.xx is currently unable to handle this request.
HTTP ERROR 500
=======================================
or http://xx.xx.xxxx/forum
the same output

but if I input: http://xx.xx.xxxx/
I got the default Apache2 page with no problem



*******************************software installed on our server**************************
php --version
PHP 7.2.24-0ubuntu0.18.04.17 (cli) (built: Feb 23 2023 13:29:25) ( NTS )

mariadb --version
mariadb  Ver 15.1 Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

apache2 -v
Server version: Apache/2.4.29 (Ubuntu)
Server built:  2023-03-08T17:34:33
*********************************************************************************************
can anyone help?

richard168

smf2.1.6 needs php 7.2,
smf2.0.8 needs php 5.x
is this the reason of my trouble?
how should i fix that while upgrading my forum from 2.0.8 to 2.1.6

Illori


richard168

could you give me some detailed instructions?

shawnb61

I think the biggest issue is stated in the image above - no db support is configured in your version of php.

You will need to talk with your host about that. 

A question worth asking is born in experience & driven by necessity. - Fripp

richard168

Hi, thanks for all the support!
i have successfully upgraded my forum:)haha!

but i still have a question while running the "repair_settings.php"
there is a TAB "Cache Settings"
i do not know how to fill these 2 blanks, "Cache System" and "Memcache Servers".
please check the attached pic.
Does anyone know the meaning of these 2 settings?


Illori

they are fine to be blank. just leave enable caching on.

richard168

Okay, thank you for your reply.

If possible, I still hope to learn as much as possible about the meanings of these parameters and how they affect the operation of the SMD forum.

richard168

Sorry, i have another issue here.
=========
all the attachments of our forum are lost
=========
firstly, after upgrading to 2.1.6, i can see attachments in the old posts,
but it says "file does not exit" when pressing these attachments.

secondly, i found a button in "Admin"->"Forum"->"Attachments and Avatars"->"File Maintenance"
this button says it can fix these issues, but after clicking this button.
all my attachments are gone, and all the files in "attachments" folder on our forum are deleted.
i can see no attachment in any of the previous posts.


richard168

sorry, i found the same attachment issue on my old forum(  2.0.8  ),
while pressing these attachments, it just says: 404 - Attachment Not Found.

but i can see many files in the "attachments" folder of my old forum.
how can i fix it on my old forum?

Kindred

If the connections are missing in the 2.0.x installation, then there is not much we can do about it.

There is an issue with some servers that don't finish the conversion to the new attachment format on the upgrade --   and those connected files can be recovered... but if they are missing from 2.0.x - then there is nothing that the upgrade process can do -- the connection is missing.

I do not believe there is any tool that can recover lost attachments in 2.0.8
Сл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."

shawnb61

A question worth asking is born in experience & driven by necessity. - Fripp

Kindred

@shawnb61 -- the OP said that the files were missing from the original  2.0.8 installation before the upgrade
Сл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."

richard168

So, is there any way I can first restore the attachments for my old 2.0.8 forum? I can see the attachment links on my old forum, but when I click on them, it just says: "404 - Attachment Not Found."

Illori

did they work in the old forum? do you have the working database and attachments? if you dont have any of those then you cannot fix this.

Kindred

If the attachments were missing when you use the 2.0.8 forum, then no.

If the attachments worked in 2.0.8 and stopped working after the upgrade, then use the link that shawn included.
Сл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."

Advertisement: