Previous Thread
Next Thread
Print Thread
Hop To
Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
#263863 05/19/2020 8:42 PM
Joined: Jan 2020
Posts: 9
Likes: 3
cegadm Offline OP
Stranger
OP Offline
Stranger
Joined: Jan 2020
Posts: 9
Likes: 3
I'd like to share my journey upgrading from 6.2.3 to 7.7.4. I hope this may help anybody avoid hiccups.

Summary
Original Version: 6.2.3
First upgrade to: 6.5.5
Then install and import to: 7.5.6
Then upgrade to: 7.7.4

Setup
I spun up two local hosts on a Windows 10 desktop. I use UniserverZ as my primary but was forced to grab an old version of xampp due to mysql incompatibility.

Your setup may differ. You may find it easier to start off with an older php/mysql config and upgrade them while you install each new version of ubbthreads.

This post will follow the steps that I took - starting with uniserverz and occasionally switching over to xampp.

1: UniserverZ XIII with both PHP 5.4 and PHP 7.3, and mariadb 10.3.17.
2: XAMPP v1.5.2 with PHP 5.2 and mysql 5.0.x.

Prerequisites
Have UBBThreads 6.2.3 and your database set up on UniserverZ pointing to PHP 5.4.
Start UniserverZ (leave xampp alone for now).
For the purposes of these instructions, ubbthreads is set up at: c:\UniserverZ\www\ubbthreads\ .

Go to mysql config.
Add this value:
Code
sql-mode=""
See this thread for more information.

Back up database and code.
Store your database:
Code
mysqldump --user=user --password=password database > ubbthreads623Backup.sql 
Zip your current codebase.

Install UBBThreads 6.5.5
Remove all UBBThreads 6.2.3 files.
Upload the UBBThreads 6.5.5 files to c:\uniserverz\www\ubbthreads\ .
Using your backup, copy these files from the old instance to the new instance:
* config.inc.php
* main.inc.php
* theme.inc.php
Paste those three files to ubbthreads/includes/

Upgrading database from 6.2.3 to 6.4.1
Follow the steps located here: http://localhost/ubbthreads/UPGRADING.html
In summary, run the following scripts:
altertable-6.2-6.3.php
altertable-6.3-6.4.php
altertable-6.4-6.4.1.php
The last statement in each script should be "Done".
If your browser times out, hit Refresh until you see Done.

Upgrading database from 6.4.1 TO 6.5.5
Navigate to http://localhost/ubbthreads/install/
Follow the instructions onscreen.

Copy themes from 6.2.3 to 6.5.5
This step is optional since you likely will be discarding themes on your quest to 7.7.4+.
Copy any special theme files from your original ubbthreads/stylesheets to ubbthreads/stylesheets.

Test: Launch UBBThreads and log in.
Test should be successful.

Back up 6.5.5
Take backup of database:
Code
mysqldump --user=username --password=password databasename > ubbthreads655backup.sql 

Switch instances.
Kill UniserverZ.
Launch xampp and load apache/mysql.
Launch phpmyadmin.
Create empty database1 (this will hold your 6.5.5 data).
Create empty database2 (this will hold your 7.5.6 data).
Create a user and grant permissions to both databases. You may use a different user for each database if preferred.
Copy your database backup file ubbthreads655backup.sql to xampp.
Import the data to xampp. Note that newer mysql commands do not work on this version of mysql. Launch a command line window:
Code
    cd c:\xampp\xampp\mysql\bin\
    mysql.exe --user=root database1
    mysql> SOURCE c:\xampp\xampp\ubbthreads655backup.sql 

Installing 7.5.6
Background: 7.5.6 is a known stable version that works with the UBBThreads 6.5.5 Importer.
Here, we will install a clean instance against an empty database, and then migrate the old data to the new database.

Copy UBBThreads 7.5.6 files to: c:\xampp\xampp\htdocs\ubbthreads\
Launch the installer at http://localhost/ubbthreads/install .
Follow steps onscreen to create empty tables.

Migrating Data from 6.5.5 to 7.5.6
Important note: The import will take a long time to run. Depending on the size of your forum, it may be hours or worth doing overnight.

Download ubbthreads_6_5_import under the Members Portal.
Copy threads_import.php to ubbthreads/importers/
Launch http://localhost/ubbthreads/importers/threads_import.php .
Follow the steps. Specify 'localhost' in the first field.

Test: Launch UBBThreads and log in.
Test should be successful.

Back up 7.5.6.
Note: I could not figure out the command to dump the database. smile
Launch http://localhost/phpmyadmin and export the database to a file: ubbthreads756Backup.sql.

Switch instances.
Kill xampp.
Launch UniserverZ.
Load apache/mariadb. Use the PHP 7.3 config (or any 7+).
Launch phpmyadmin and create a new empty database2 (this will hold your 7.5.6 data).
Upload the data:
Code
mysql --user=username --password=password database2 < ubbthreads756Backup.sql. 

Installing 7.7.4
Delete the existing ubbthreads 6.5.5 directory.
Copy UBBThreads 7.7.4 files to the ubbthreads directory.
Launch: http://localhost/ubbthreads/install/upgrade.php
Log in as administrator and follow the steps.

NOTE:
You may encounter an error: The following files do not exist in your install.
If this occurs, navigate to /install/upgrade_changes.txt, remove the offending lines and rerun upgrade.php.
Background information and examples.

Test: Launch UBBThreads and log in.
Test should be successful.

Fix forum settings.
If images are not correctly appearing, you will need to edit the forum styles.
Navigate to Control Panel -> Display -> Styles.
Click on a Style.
Under "Name, Images & Wrapper", ensure each is set correctly and then click Update.
Repeat for each Style.
Background and more information.

Forums may not display correctly for all users.
Navigate to Control Panel -> Permissions -> Forum. Scrutinize every setting and ensure they are correctly set.

Back up 7.7.4.
Take backup of database.
Zip the UBBThreads codebase.

Finish!
At this point the database and files should be ready to move to your production server.

1 member likes this: Gizmo
Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
cegadm #263867 05/22/2020 11:10 AM
Joined: Jan 2020
Posts: 9
Likes: 3
cegadm Offline OP
Stranger
OP Offline
Stranger
Joined: Jan 2020
Posts: 9
Likes: 3
Secondary issues noted

At some point in the conversion soiree, my table names became all lowercase.
If your prod server database is case sensitive (which is default mysql lower_case_table_names value for linux systems), you will need to change each table name to uppercase. e.g. ubb_users becomes ubb_USERS. This took about 15 minutes to do manually in phpmyadmin.

Additional forum settings fix: All users were imported as Moderators. This is a known bug and requires db manipulation or manually fixing each user in the Control Panel.

Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
cegadm #263868 05/22/2020 4:05 PM
Joined: Jun 2006
Posts: 15,926
Likes: 22
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,926
Likes: 22
Originally Posted by cegadm
At some point in the conversion soiree, my table names became all lowercase.
Unfortunately, that's how Windows works by default; which is a pain if you ever change over to a Linux host; as Linux hosts require everything be CaSe SeNsItIVe and the setting "lower_case_table_names" just says to use all lowercase.

When we migrate to v8 we've been discussing having all lowercase table and field names for compatibility with this option.


Originally Posted by cegadm
Additional forum settings fix: All users were imported as Moderators. This is a known bug and requires db manipulation or manually fixing each user in the Control Panel.
This is why I suggest upgrading to 7.2 then to the latest; I'll need to look at what got changed in the importer by a previous developer to make it incompatible with 7.2.

To "fix" this you'll need to hop through a couple of hoops, but basically what is happening is your group #2 users are now in the current group #2 which is Global Moderators, then #3 moderators (all of your users), etc.


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!
Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
cegadm #263869 05/22/2020 4:06 PM
Joined: Dec 2003
Posts: 6,130
Likes: 20
Offline
Joined: Dec 2003
Posts: 6,130
Likes: 20
The case issue with the table names is a windows issue.
There is a way to circumvent it in the I believe mysql settings but the answer escapes me right now.
It has to be done before you start.
Even though you used xamp or wamp on your pc it still has a windows frontend.
Windows is not case sensitive where Apache is.

Something I forgot to mention to you earlier.
Sorry.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
Ruben #263870 05/22/2020 4:14 PM
Joined: Jun 2006
Posts: 15,926
Likes: 22
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,926
Likes: 22
Originally Posted by Ruben
Windows is not case sensitive where Apache is.
Its actually just the MySQL setting "lower_case_table_names"
Quote
This system variable determines whether table names, table aliases, and database names are compared in a case-sensitive manner, and whether tablespace files are stored on disk in a case-sensitive manner.

Basically setting a value in your my.cnf file should force CaSe SeNsItIvItY:
Code
lower_case_table_names=0


Default Values:
Linux: 0 (what we expect)
Windows: 1 (which will give you problems if you migrate to a Linux machine later)


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!
Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
cegadm #263871 05/22/2020 4:23 PM
Joined: Dec 2003
Posts: 6,130
Likes: 20
Offline
Joined: Dec 2003
Posts: 6,130
Likes: 20
Thanks Giz.
I was just looking it up because I could not remember it.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
cegadm #263872 05/22/2020 5:03 PM
Joined: Jun 2006
Posts: 15,926
Likes: 22
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,926
Likes: 22
cegadm, I have an updated importer if you'd like to test it with v7.2 (to skirt the issue with permissions being off); please PM me your email address if you're interested.


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!
Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
cegadm #263874 05/23/2020 12:21 PM
Joined: Jan 2020
Posts: 9
Likes: 3
cegadm Offline OP
Stranger
OP Offline
Stranger
Joined: Jan 2020
Posts: 9
Likes: 3
Thanks all! Yes, I chose not to change the lower_case_table_names value because the server has other databases that could have been impacted. Manually changing the table names to uppercase was less risky.

Re: Upgrade from UBBThreads 6.2.3 to 7.7.4 - Instructions
cegadm #263875 05/23/2020 12:54 PM
Joined: Dec 2003
Posts: 6,130
Likes: 20
Offline
Joined: Dec 2003
Posts: 6,130
Likes: 20
It would only be in your windows environment.
Not your live site.


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

Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
YouTube embedding
by jjjjj - 06/06/2020 6:14 PM
Ubb 7.7.4 Gallery problems
by jjjjj - 05/25/2020 2:35 PM
7.7.4 error after php upgrade to php 7.0
by Ruben - 05/25/2020 1:10 PM
7.7.4 move group all, fails with a error
by Ruben - 05/24/2020 3:07 PM
Grid lines in forum topics list
by Steve C - 05/23/2020 12:09 PM
Who's Online Now
3 members (Morgan, Gizmo, JAISP), 115 guests, and 40 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4