[Help] Upgrade from 2.0 have infinite loop

Started by Ulibka, April 23, 2020, 04:30:46 AM

Previous topic - Next topic

Ulibka

I'm install 2.015 SMF at my local machine (Windows 10-64, Openserver (Apache+php7.3 + MySql8)
It's fresh install - no mods - one custome theme "woodtools"

Next I'm try to upgared to SMF2.1-rc2

I'm start upgrade.php and wait for a long time in step:

Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made!
Executing: "Changing column names." (1 of 42)

I'm enable query log for all queries and see infinite loop :

Connect   root@localhost on  using TCP/IP
Init DB   woodtools
Query   SET NAMES utf8

Query   SELECT variable, value FROM smf_settings

Query   SELECT variable, value
      FROM smf_themes
      WHERE id_theme = 1
         AND variable IN ('theme_url', 'theme_dir', 'images_url')


This queryes repeated one by one and nothing more is happened.

May be problem in smf_settings table ?

vbgamer45

I don't believe we have done full testing with MySql8 yet you may need to try an older version of MySQL
Community Suite for SMF - Take your forum to the next level built for 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

albertlast

I don't think that we got here a mysql 8.0 issue.

vbgamer45

True might not be. I would suggest Ulibka to grab the latest github version as there might have been fixes made.
Community Suite for SMF - Take your forum to the next level built for 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

shawnb61

Yes, latest GitHub is lightyears ahead of the posted RC2.  Try that first.

But it's also true that we don't have a lot of mysql8 experience to-date, and the very little we've seen has issues.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Ulibka

I see this repo:
https://github.com/SimpleMachines/SMF2.1/tree/release-2.1

But this repo don't have upgrade.php - I think it's for fresh installation.

I can try MySQL 5-7
But installation isn't easy becuse my db size is about 5GB

Do you know - is it possible manualy import from old database to new fresh installation ?
What table I don't to import ? (for example smf_log_*** ?)
And I don't know - what records to leave in smf_settings ?

Shambles

Quote from: Ulibka on April 23, 2020, 01:18:46 PM
I see this repo:
https://github.com/SimpleMachines/SMF2.1/tree/release-2.1

But this repo don't have upgrade.php - I think it's for fresh installation.

Did you look inside the folder named "other" ?

shawnb61

Yes, to do the upgrade, you need to copy the 8 files from /other to the forum root.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Ulibka

Thank you Shambles, shawnb61.
I'm try to upgrade using git version, but unsuccesfuly
upgrade.php craches at step4:

Fatal error: Uncaught Error: Call to undefined function log_error() in
Y:\OSPanel5-3-5\domains\woodtools\Sources\Subs.php:6422
Stack trace: #0
Y:\OSPanel5-3-5\domains\woodtools\Sources\Load.php(69): smf_json_decode('a:5:{i:1;s:45:"...', true) #1
Y:\OSPanel5-3-5\domains\woodtools\install.php(1535): reloadSettings() #2
Y:\OSPanel5-3-5\domains\woodtools\install.php(145): AdminAccount() #3
{main} thrown in Y:\OSPanel5-3-5\domains\woodtools\Sources\Subs.php on line 6422

In smf_setting I'm have record:
attachmentUploadDir
a:5:{i:1;s:45:"Y:\OSPanel5-3-5\domains\woodtools/attachments";i:2;s:46:"Y:\OSPanel5-3-5\domains\woodtools/attachments1";i:3;s:46:"Y:\OSPanel5-3-5\domains\woodtools/attachments2";i:4;s:46:"Y:\OSPanel5-3-5\domains\woodtools/attachments3";i:5;s:45:"Y:\OSPanel5-3-5\domains\woodtools/attachments";}

smf_attachments has 386 000 records and attachments placed in 4 directories:
attachments,attachments1,attachments2,attachments3

Antes

Are you running the upgrade via browser? - try upgrading SMF via CLI (5gb worth table is not small and you might have timeouts due to limitations of php)

shawnb61

#10
You're running the installer, but you need to be running the upgrader.  Sorry, I guess I needed to be more specific...  To upgrade, you need to copy the 8 upgrade files from other to the root.  (upgrade*.*)

I would:
- Restore your settings file from before the upgrade (it may have been stepped on)
- Delete the install*.* files from your forum root
- Copy the 8 upgrade*.* files from /other to your forum root
- Run the upgrader

On large forums like this, the browser will run OK, but some tasks need to run many minutes/hours.  The browser is impatient and gives you a wtf prompt after not hearing from the server in 30 secs...  If the server is still chugging along, just ignore the warning & let it run.   DO NOT NAVIGATE AWAY from the upgrader tab while it is running.

Antes is correct, the CLI is a viable option here.  CLI is good at shorter jumps, & you're only going from 2.0 to 2.1 here.  It's a little more clear when there is a hard error.  I am not as familiar with the CLI, there may be more manual steps post-upgrade.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Ulibka

Yes, I'm run http://woodtools/upgrade.php

At php.ini I'm set
max_execution_time           = 60000

Antes, how I can upgrading SMF via CLI  ?

I can't insert any image to this forum.
Is any way to do it ?

My top records in database :
smf_log_search_words   57 000 000 records
smf_log_topics         14 000 000 records
smf_log_boards         9 000 000 records
smf_log_mark_read      8 000 000  records

Is it possible to clear all smf_log tables ?

Ulibka

Quote from: shawnb61 on April 24, 2020, 02:34:52 AM
I would:
- Restore your settings file from before the upgrade (it may have been stepped on)

How I can do it ?

Antes

Unless there is a bug (which is not unusual for 2.1 at this stage), CLI upgrade & Browser should result same output, upgrade.php designed to handle both ways... How to upgrade via CLI is actually simple, you just need a command-line access to the server and navigate to your SMF folder (say like yours is under /var/www/html/) and run;

php upgrade.php

Upgrade process requires same files regardless of the way you run it, so for CLI or for Browser you still need to have upgrade.php / upgrade-helper.php & required SQL file(s) -in this case 2.1-

Ulibka

I'm run php upgrade.php

And process start work!!!!
I'm see many screen messages and many different queryes in log.!
(process still working)

Ulibka

upgrade.php was ended sucessfuly!

Is I need some manual steps?

Ulibka

I can't run index.php at my forum.
It produce error  and write : run upgrade.php

upgrade.php start from step 4 - Database Changes

Once I'm see error - "Server does not respond for 30 second, try again" and after some seconds error was gone.
I'm see this select queryes in infinite loop - one by one:

SELECT variable, value FROM smf_themes WHERE id_theme = 1 AND variable IN ('theme_url', 'theme_dir', 'images_url')

Nothing is doing else  :'(

Ulibka

I'm run php upgrade.php again
It was work succesfully.
Next I delete upgrade.php and run index.php in browser and recieve error:

Antes

Copy following files and run upgrade.php again (via CLI)

> upgrade.php
> upgrade-helper.php
> upgrade_2-0_mysql.sql
> upgrade_2-1_mysql.sql

if this does not work, please wait a developer to help you further.

Ulibka

copy all files from "Other" directory and rewrite setting.php
all stop working :)
Ok, import database again and start from scratch

Advertisement: