News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Upgrading from 2.0.19 to 2.1.4 Questions

Started by vmstek, April 12, 2025, 05:01:06 PM

Previous topic - Next topic

vmstek

So I am doing the 2.0.19 to 2.1.4 upgrade on an old forum (2.0.11) which was using the following mods. The update is primarily due to web hosts using PHP 8.2+. I have moved the forum to my local Ubuntu 24.04 server which has PHP 8.4.5 and PHP 7.4 (which I installed just to run the forum.

- Inferno2.0 theme
- SimplePortal    2.3.6
- Shoutbox Color Selector 1.1a
- SMFPacks Shoutbox 2.0
- SMF Gallery Pro 7.0.4
- Simple Audio Video Embedder 6.0.4
- Login Form Fix 1.0
- Signature Option Post 1.1.1

1) Should I remove all these mods prior to the large update?
2) Are any of them "salvageable"? It would be nice to at least save the Gallery Pro.
3) Is it safe to remove all the SMF Updates (2.0.11 - 2.0.19) from the package manager?

Illori

Quote from: vmstek on April 12, 2025, 05:01:06 PM1) Should I remove all these mods prior to the large update?
2) Are any of them "salvageable"? It would be nice to at least save the Gallery Pro.
3) Is it safe to remove all the SMF Updates (2.0.11 - 2.0.19) from the package manager?

all mods are uninstalled in the upgrade process
you should check for updated versions that work with 2.1.4
you can remove all update packages.

https://wiki.simplemachines.org/smf/Upgrading

vbgamer45

Yes just to add on:

1. A large upgrade will remove all mods. The theme would not be usable unless they have a 2.1 version.
2. Check if the mods have a 2.1 version.  For Gallery pro you can extend your license for $25 to get the latest version.
Mods in general though like SP might not work in newer PHP versions if they are not properly maintained.
3. yes





Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

Quote from: vmstek on April 12, 2025, 05:01:06 PM1) Should I remove all these mods prior to the large update?
2) Are any of them "salvageable"? It would be nice to at least save the Gallery Pro.
Not necessary to remove mods, but you should remove hooks with repair_settings.  You can reinstall mods that have been updated to 2.1 using current packages.  They should retain content from 2.0.  SimplePortal has not been updated, will not work in 2.1.  IIRC, you can install ehportal and it will retain SP content.  Gallery Pro is a paid mod, good for 2.1.  You'll have to get the current package from SMFHacks.

Quote3) Is it safe to remove all the SMF Updates (2.0.11 - 2.0.19) from the package manager?
Yes
When in Emor, do as the Snamors.
                              - D. Lister

Illori

Quote from: Sir Osis of Liver on April 12, 2025, 05:19:47 PMNot necessary to remove mods, but you should remove hooks with repair_settings. 

the upgrade.php script does this automatically with SMF 2.1.

vmstek

Thanks everyone.

The upgrade was going well until it got to Step 6, where it froze updating
Current Table: "gallery_title_cache"

I am wondering if I should have changed the default PHP from 7.4 to 8.4 before starting the upgrade.

Aleksi "Lex" Kilpinen

It's fairly normal that the upgrade may seem to stop at some point, usually just giving it more time is enough and upgrade is actually just busy in the background.

That looks like a mod added table though, so if it doesn't seem to go through, perhaps emptying or removing that table could be a solution.
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

vmstek

I waited over an hour and no CPU activity at all, and no error logged.
So I had to drop the backup_SMF database and now working on restoring a backup.
But, of course that is not going well either....going to be a long day.


Doug Heffernan

Quote from: vmstek on April 13, 2025, 09:54:01 AMI waited over an hour and no CPU activity at all, and no error logged.
So I had to drop the backup_SMF database and now working on restoring a backup.
But, of course that is not going well either....going to be a long day.



Did you try to delete that table as advised above?

Sir Osis of Liver

Quote from: vmstek on April 12, 2025, 09:47:16 PMI am wondering if I should have changed the default PHP from 7.4 to 8.4 before starting the upgrade.

SMF 2.1 does not support php 8.4.  You should be in 8.1/8.2.

Quote from: Illori on April 12, 2025, 07:52:45 PM
Quote from: Sir Osis of Liver on April 12, 2025, 05:19:47 PMNot necessary to remove mods, but you should remove hooks with repair_settings. 

the upgrade.php script does this automatically with SMF 2.1.

Had a problem with that in recent upgrade.  Ended up having to delete hooks manually from settings table.

When in Emor, do as the Snamors.
                              - D. Lister

vmstek

Quote from: Doug Heffernan on April 13, 2025, 10:58:43 AMDid you try to delete that table as advised above?
Ended up restoring the backup...ran into a UTF8 issues on the restore but figured it out.

Quote from: Sir Osis of Liver on April 13, 2025, 01:13:31 PMSMF 2.1 does not support php 8.4.  You should be in 8.1/8.2.
Ah ! that might help.
I am only doing the upgrade because the webhost does not support 7.4, only 8.2.
I am doing the upgrade on my local server, and will then transfer to the webhost.

So my current 2.0.19 forum is running locally on Apache2/PHP7.4.
Should I disable PHP7.4 and enable PHP8.2 before starting the upgrade?


Kindred

2.0.19 only supports up to 8.0 but 2.1.4 supports 7.4 -- so, my suggestion is do the upgrade on 7.4 and then update php
Сл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."

vmstek

Well that upgrade did not work out...no matter what I try my forum will not load.
And nothing in the error log since last August.

I deleted 1 table as suggested when it hung and the upgrade finished but site will not load.
Tried to restore database and forum from backups...no success.

Re&Re'd and purged PHP7.4 several times, enabled 7.4 mod in apache2 no luck.

Server is completely fubar'd.  10 years of technical docs and posts, gone.

I just built a brand new server for this just 1 month ago and everything was fine.

Sir Osis of Liver

Do you have a database dump from before you tried upgrade?

Link to forum?
When in Emor, do as the Snamors.
                              - D. Lister

Doug Heffernan

Quote from: vmstek on April 14, 2025, 09:33:57 PMTried to restore database and forum from backups...no success.

Provided you ticked the backup option before running the upgrader, you don't need to do a database restore. All you have to do is replace the database prefix with backup_ at your Settings.php file and you should be all set.

vmstek

Quote from: Sir Osis of Liver on April 14, 2025, 09:42:36 PMDo you have a database dump from before you tried upgrade?
Link to forum?
I had several database backups from the forums maintenance section, phpmyadmin, and mysql CLI.
The forum is currently on my localhost. I was trying to upgrade to move it a webhost that only supports PHP8.2 .

Quote from: Doug Heffernan on April 15, 2025, 06:23:45 AM
Quote from: vmstek on April 14, 2025, 09:33:57 PMTried to restore database and forum from backups...no success.

Provided you ticked the backup option before running the upgrader, you don't need to do a database restore. All you have to do is replace the database prefix with backup_ at your Settings.php file and you should be all set.
I did have that backup option ticked...but could not find any documentation on what it did.
When the database upgrade hangs on a table, and you have to get out of the upgrade to delete it,it leaves all the tables with the prefix "backup_smf..".
I had to drop the database, recreate  it and import my backup tables.
The imports kept failing until I created the database with Collation set to utf8mb3_general_ci


Took me all day to finally get back to last months status and refresh my MySQL CLI knowledge.
PHPmyadmin is no help as you have to keep enabling and disabling the PHP mod in Apache2 to use it.
And while Ubuntu 22.04 says it is using PHP version 8.4, the apache2 mod is not present, but the 8.2 mod is, even though PHP8.2 is not installed.





Doug Heffernan

Quote from: vmstek on April 15, 2025, 10:34:59 AMI did have that backup option ticked...but could not find any documentation on what it did.

It's mentioned at the online wiki:

QuoteThe upgrading tool can backup all database tables before it runs

https://wiki.simplemachines.org/smf/Upgrading

Quote from: vmstek on April 15, 2025, 10:34:59 AMWhen the database upgrade hangs on a table, and you have to get out of the upgrade to delete it,it leaves all the tables with the prefix "backup_smf..".

Those tables with the backup_ prefix as previously mentioned, are the tables of the current version created by the upgrader before it is run. i.e. your database backup.

vmstek

First  off...thanks for taking the time to help out. I am willing to give it another try.

I read the upgrading help file before starting, however it does not mention how to proceed when the upgrade gets hung up on a table.

When I read "backup" I assume it creates and saves a copy of the original database somewhere that could be restored if necessary. "Selecting this option will get the upgrade tool to copy all data in the database before upgrading within the original database."
However, both times when the upgrade hung on a table I went back to MsSQL and only saw my database with all the tables renamed to "backup_smf..." I did not see the original database. Otherwise I would not have had to restore my backup. Did I miss something?

What is the proper procedure when the upgrade hangs on updating a table?
I did the suggestion about deleting that table then re-ran the upgrade, but now I do not have that necessary table. Is it going to somehow recreate itself?

This is not a large site, 170 users...only a couple mods (SimplePortal & Shoutbox),  700MB total , and the database is only 1.700KB.


Sir Osis of Liver

There should be two sets of tables in the database, those with the backup_smf_ prefix are the original tables from before the upgrade, those with smf_ prefix are the same tables that are being upgraded.  If you didn't backup the database before you started, you can restore it by dropping the smf_ tables and renaming the prefix on the backup tables from backup_smf_ to smf_. 

Not to be unkind, but you've made a mess out of what should have been a routine upgrade of a small forum.  What you should do is restore the 2.0.19 install, get it up and running, then read the upgrade instructions and start over from the beginning. Assuming, of course, that you haven't damaged the database and have a good backup.
 
When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: