Upgrade from 2.0.14 -> 2.1 beta3 fails

Started by atxbyea, November 12, 2017, 11:02:37 AM

Previous topic - Next topic

atxbyea

Quote from: shawnb61 on November 13, 2017, 11:07:33 PM
Well I just did a 2.0.15 => 2.1 beta upgrade (current from git) in my MySQL 5.7.11 environment & had no such issue.  I'm a bit flummoxed. 

Here are a couple straws to grasp at:
  -  What php version?
  -  Have you tried executing upgrade.php from your browser, not the command line?

I admit I never use the command line - the browser is just too easy.  But I'm trying to think of things that are different here...

root@ferus:~# php -v
PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.19-1, Copyright (c) 1999-2017, by Zend Technologies


I always run the upgrades from the web, never tried the CLI :-)

My MySQL was 5.7.20 as you can see above, that is a difference though.

atxbyea

Quote from: albertlast on November 12, 2017, 03:28:30 PM
When this is the issue:

/******************************************************************************/
--- Installing new smileys sets...
/******************************************************************************/

---# Installing new smiley sets...
---{
// Don't do this twice!
if (empty($modSettings['installed_new_smiley_sets_20']))
{
// First, the entries.
upgrade_query("
UPDATE {$db_prefix}settings
SET value = CONCAT(value, ',aaron,akyhne')
WHERE variable = 'smiley_sets_known'");
// Second, the names.
upgrade_query("
UPDATE {$db_prefix}settings
SET value = CONCAT(value, '\nAaron\nAkyhne')
WHERE variable = 'smiley_sets_names'");
// This ain't running twice either.
upgrade_query("
REPLACE INTO {$db_prefix}settings
(variable, value)
VALUES
('installed_new_smiley_sets_20', '1')");
}
---}
---#


Than is this the fix:
/******************************************************************************/
--- Installing new smileys sets...
/******************************************************************************/

---# Installing new smiley sets...
---{
// Don't do this twice!
if (empty($modSettings['installed_new_smiley_sets_20']))
{
// First, the entries.
upgrade_query("
UPDATE {$db_prefix}settings
SET `value` = CONCAT(`value`, ',aaron,akyhne')
WHERE `variable` = 'smiley_sets_known'");
// Second, the names.
upgrade_query("
UPDATE {$db_prefix}settings
SET `value` = CONCAT(`value`, '\nAaron\nAkyhne')
WHERE `variable` = 'smiley_sets_names'");
// This ain't running twice either.
upgrade_query("
REPLACE INTO {$db_prefix}settings
(`variable`, `value`)
VALUES
('installed_new_smiley_sets_20', '1')");
}
---}
---#


Even after editing the script I still get the following

Executing: "Cleaning up after old themes..." (33 of 41 - of this script)



Renaming table columns...done
Converting "log_online"...done
Implementing board redirects...done
Creating spider table...done
Removing a spider...done
Creating spider hit tracking table...done
Making some changes to spider hit table...done
Creating spider statistic table...done
Resetting settings_updated...done
Changing stats settings...done
Enable cache if upgrading from 1.1 and lower..done
Changing visual verification setting...done
Changing visual verification setting, again...done
Changing default personal text setting...done
Removing allow hide email setting...done
Ensuring stats index setting present...done
Ensuring forum width setting present...done
Replacing old calendar settings...done
Deleting old calendar settings...done
Adjusting calendar maximum year...done
Adding advanced signature settings...done
Updating spam protection settings...done
Adjusting timezone settings...done
Checking theme layers are correct for default themes...done
Adding index to log_notify table...done
Creating "custom_fields" table...done
Adding search ability to custom fields...done
Fixing default value field length...done
Enhancing privacy settings for custom fields...done
Checking display fields setup correctly...done
Adding new custom fields columns...done
Creating "log_digest" table...done
Adding digest option to "members" table...done
Creating "log_packages" table...done
Adding extra "log_packages" columns...done
Changing URL to SMF package server...done
Creating "mail_queue" table...done
Adding new mail queue settings...done
Change mail queue indexes...done
Adding type to mail queue...done
Creating "log_reported" table...done
Creating "log_reported_comments" table...done
Adding moderator center permissions...done
Adding moderation center preferences...done
Creating member notices table...done
Creating comments table...done
Adding user warning column...done
Ensuring warning settings are present...done
Creating "log_group_requests" table...done
Adding new membergroup table columns...done
Creating "group_moderators" table...done
Altering attachment table...done
Adding file hash...done
Populate the attachment extension...done
Updating thumbnail attachments JPG...done
Updating thumbnail attachments PNG...done
Calculating attachment mime types...done
Creating "approval_queue" table...done
Adding approved column to attachments table...done
Adding approved column to messages table...done
Adding unapproved count column to topics table...done
Adding approved column to topics table...done
Adding approved columns to boards table...done
Adding post moderation permissions...done
Adding columns to log_errors table...done
Updating error log table...done
Creating Scheduled Task Table...done
Populating Scheduled Task Table...done
Adding the simple machines scheduled task...done
Deleting old scheduled task items...done
Moving auto optimise settings to scheduled task...done
Creating Scheduled Task Log Table...done
Adding new scheduled task setting...done
Setting the birthday email template if not set...done
Creating "permission_profiles" table...done
Adding profile columns to boards table...done
Adding profile columns to board permission table...done
Cleaning up some 2.0 Beta 1 permission profile bits...done
Migrating old board profiles to profile system...done
Removing old board permissions column...done
Check the predefined profiles all have the right permissions...done
Adding inherited permissions...done
Make sure admins and moderators don't inherit...done
Deleting old permission settings...done
Removing old permission_mode column...done
Adding column to hold the boards being ignored ...done
Purge flood control ...done
Adding advanced flood control ...done
Sorting out flood control keys ...done
Adding guest voting ...done
Implementing admin feature toggles...done
Adding advanced password brute force protection to "members" table...done
Add the columns and the keys to log_actions ...done
Add the user log...done
Update the information already in log_actions...done
Creating repository table ...done
Add in the files to get from Simple Machines...done
Ensure that the table has the filetype column...done
Set the filetype for the files...done
Ensure that the files from Simple Machines get updated...done
Adding personal message rules table...done
Adding new message status columns...done
Set the new status to be correct....done
Adding personal message tracking column...done
Adding personal message tracking column...done
Adding Open ID Assocation table...done
Adding column to hold Open ID URL...done
Creating subscriptions table...done
Creating log_subscribed table...done
Clean up any pre-2.0 mod settings..done
Clean up any pre-2.0 mod settings (part 2)..done
Confirming paid subscription keys are in place ...done
Adding scheduled task...done
Adding pruning option...done
Adding restore from recycle feature...done
Changing field_options column to a larger field type...done
Changing ignore_boards column to a larger field type...done
Changing event title column to a larger field type...done
Changing holidays title column to a larger field type...done
Adding reset poll timestamp and guest voters counter...done
Fixing guest voter tallys on existing polls...done
Changing all tinytext columns to varchar(255)...done
Adding column that stores the PM receiving setting...done
Enable the buddy and ignore lists if we have not done so thus far...done
Add new security settings for attachments and avatars...done
Add other attachment settings...done
Checking for "babylon" and removing it if necessary...done
!!Error!
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3

shawnb61

Which file did you update?   Remember to install from github, you gotta copy the files from /other.  Make sure you're running an updated file.

That particular file reapplies 2.0 updates as a safety measure.  If you were properly 2.0.x already, those updates are not needed.   (Though the file is...)
So another thing to try would be to just delete all sections from the babylon theme cleanup on down.  The real meat is in the 2.1 .sql file.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

atxbyea

Quote from: shawnb61 on November 15, 2017, 11:23:08 AM
Which file did you update?   Remember to install from github, you gotta copy the files from /other.  Make sure you're running an updated file.

That particular file reapplies 2.0 updates as a safety measure.  If you were properly 2.0.x already, those updates are not needed.   (Though the file is...)
So another thing to try would be to just delete all sections from the babylon theme cleanup on down.  The real meat is in the 2.1 .sql file.

Aye, this was with the "official" non git version, I have copied the extracted upgrade.zip [nofollow] to the www-root and edited the "upgrade_2-0_mysql.sql" file as above (with ` ` around the value and variable entires, and pico does confirm the change by making those expressions blue when I add it).

So just delete everything from line 2817 and down ?

shawnb61

Quote from: atxbyea on November 16, 2017, 08:22:29 AM
So just delete everything from line 2817 and down ?

Let's go from 2754 down, just in case it was not really done with babylon. 

I think it will successfully do the first few steps in the 2.1 mysql.sql file.  But where it fails will help confirm/disprove the suspicion that 'value' is the culprit. 

And if 'value' is the culprit, I don't think your edits were being executed - the quotes should have fixed that.  The edited *mysql.sql files should end up in your forum's root directory during the upgrade (same directory as settings.php & upgrade.php). 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Nolt


SleePy

Quote from: atxbyea on November 12, 2017, 01:06:02 PM
Did you mean my.cnf ?


# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/


Yes my bad, it should be the my.cnf.
As you can see from the config, it is including all files in those directories.  Can you include those as well?

Your running Debian though, so thats interesting.  I thought the issue was relevant with CentOS.  Are you also running this as 32 bit?

Quote from: Nolt on November 16, 2017, 05:07:56 PM
Fingers crossed to see MariaDB support :)
There is no official support for MariaDB, but I will see what is causing this at least.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

atxbyea

Quote from: SleePy on November 16, 2017, 08:25:14 PM
Quote from: atxbyea on November 12, 2017, 01:06:02 PM
Did you mean my.cnf ?


# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/


Yes my bad, it should be the my.cnf.
As you can see from the config, it is including all files in those directories.  Can you include those as well?

Your running Debian though, so thats interesting.  I thought the issue was relevant with CentOS.  Are you also running this as 32 bit?

Quote from: Nolt on November 16, 2017, 05:07:56 PM
Fingers crossed to see MariaDB support :)
There is no official support for MariaDB, but I will see what is causing this at least.

Not very much interesting in the files though, but they are attached!

root@ferus:~# uname -a
Linux ferus 4.9.0-4-686-pae #1 SMP Debian 4.9.51-1 (2017-09-28) i686 GNU/Linux


Indeed 32bit

atxbyea

#28
Quote from: shawnb61 on November 16, 2017, 10:15:58 AM
Quote from: atxbyea on November 16, 2017, 08:22:29 AM
So just delete everything from line 2817 and down ?

Let's go from 2754 down, just in case it was not really done with babylon. 

I think it will successfully do the first few steps in the 2.1 mysql.sql file.  But where it fails will help confirm/disprove the suspicion that 'value' is the culprit. 

And if 'value' is the culprit, I don't think your edits were being executed - the quotes should have fixed that.  The edited *mysql.sql files should end up in your forum's root directory during the upgrade (same directory as settings.php & upgrade.php).

Deleting from 2754 and down did let the upgrade complete with no errors!

But..

Previously installed Themes and smileys appear to be missing in the installation, rather expected though since those are the lines we removed.

Tried to import the theme, but it seems to not be compatible with 2.1 anyway.. so I probably have to play around to get that working also..

Your theme does not show it has compatibility with SMF 2.1 Beta 4. Please contact the theme author.

shawnb61

2.1 themes are incompatible with 2.0 themes.  You need to wait for some 2.1 themes.

You could have left your old smileys folder there (and attachments, and avatars) and kept them.   
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: