Upgrade failure 2.05 RC 5 to 2.1.4

Started by llyon, September 17, 2024, 01:56:24 AM

Previous topic - Next topic

llyon

Getting the following error when attempting to upgrade a test installation (per the subject line) :


Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, bool given in D:\www\htdocs\cbm\upgrade.php:811 Stack trace: #0 D:\www\htdocs\cbm\upgrade.php(811): mysqli_fetch_assoc(false) #1 D:\www\htdocs\cbm\upgrade.php(212): loadEssentialData() #2 {main} thrown in D:\www\htdocs\cbm\upgrade.php on line 811

Anyone have an idea what the issue might be ?


Kindred

What version of php?


Also, I'm actually not sure if the upgrade properly works from 2.0 rc versions.

You should probably upgrade to 2.0.19 and then 2.1.4


But first report your php version please
Сл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."

llyon

PHP version is 8.2.12, I'll give the 2.0.19 path a try and report back.

llyon

Same error upgrading to 2.0.19 :

Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, bool given in D:\www\htdocs\cbm\upgrade.php:897 Stack trace: #0 D:\www\htdocs\cbm\upgrade.php(897): mysqli_fetch_assoc(false) #1 D:\www\htdocs\cbm\upgrade.php(121): loadEssentialData() #2 {main} thrown in D:\www\htdocs\cbm\upgrade.php on line 897


Sir Osis of Liver

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

shawnb61

Are the db credentials correct?

After restoring from backup to build your test environment, did you run repair_settings.php?

Did you have a fully working test environment after restore & before attempting the upgrade?

The upgrader only works on fully working environments - all settings & credentials must reflect the new location & db.
A question worth asking is born in experience & driven by necessity. - Fripp


llyon

Quote from: shawnb61 on September 17, 2024, 04:46:58 PMAre the db credentials correct?

After restoring from backup to build your test environment, did you run repair_settings.php?

Did you have a fully working test environment after restore & before attempting the upgrade?

The upgrader only works on fully working environments - all settings & credentials must reflect the new location & db.

DB creds are correct, test environment was working prior to the upgrade (and yes, I restored it after the failure and it still works :) )

shawnb61

After restoring from backup to build your test environment, did you run repair_settings.php?

This is occurring ~mid-startup.  It cannot read the smf_settings table.

What happens if you run this in your test db?

SELECT variable, value FROM smf_settings;
A question worth asking is born in experience & driven by necessity. - Fripp

llyon


shawnb61

#10
Quote from: shawnb61 on September 17, 2024, 04:46:58 PMAfter restoring from backup to build your test environment, did you run repair_settings.php?

Quote from: shawnb61 on September 17, 2024, 09:37:01 PMAfter restoring from backup to build your test environment, did you run repair_settings.php?

Also, what version of MySQL are you running?
A question worth asking is born in experience & driven by necessity. - Fripp

llyon

No - there was no need to run the restore settings script.

mysql ver 15.1 Distrib 10.4.32-MariaDB, for Win64

shawnb61

Why was repair_settings.php not needed?

Can you describe what backup you were restoring the file system from? Also, what backup you were restoring the db from?


I checked, & there were no real db changes in 2.0.x since SMF 2.0 RC5.  In fact I did a 2.0 RC5 install & upgraded to 2.1.4 with no issues.  Completely vanilla & empty, tho...

It appears to be losing the db connection.

Anything in the mariadb logs? 

The next thing I'd look into is whether there have been changes to the db due to mods.

This tool will tell you how close the db is to vanilla.  Download to your test forum root & execute:
https://raw.githubusercontent.com/sbulen/sjrbTools/master/smf_db_compare.php

Anything red or green on that report would need a review.
A question worth asking is born in experience & driven by necessity. - Fripp

Doug Heffernan

Quote from: llyon on September 18, 2024, 11:45:35 PMNo - there was no need to run the restore settings script.

Whenever the forum url is changed running the aforementioned tool is a must as all paths and urls need to be pointing at the new location.

Kindred

If you did not run repair_settings.php, then your test copy would actually still be using the paths and database of the live installation!!
Сл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."

llyon

Quote from: Doug Heffernan on September 19, 2024, 04:57:42 AM
Quote from: llyon on September 18, 2024, 11:45:35 PMNo - there was no need to run the restore settings script.

Whenever the forum url is changed running the aforementioned tool is a must as all paths and urls need to be pointing at the new location.

The forum URL was not changed.

llyon

Quote from: Kindred on September 19, 2024, 07:14:20 AMIf you did not run repair_settings.php, then your test copy would actually still be using the paths and database of the live installation!!

This isn't a live forum - it's my test install. The URL therefore has not changed.

Sir Osis of Liver

Did you try upgrading from 2.0.5 to 2.0.19 by installing patches with package manager?

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

llyon

Quote from: Sir Osis of Liver on September 19, 2024, 06:01:50 PMDid you try upgrading from 2.0.5 to 2.0.19 by installing patches with package manager?



I've just done the 2.0.5 to 2.0.19 then to 2.1.4 and downgraded PHP to 8.0 - issue is resolved now.

Thanks to all - I'll mark this as solved.

Doug Heffernan

Quote from: llyon on September 19, 2024, 05:41:04 PMThe forum URL was not changed.

It has changed for the test forum, that's what we are talikng about here. Besides the url, all the paths and settings have changed too.

Advertisement: