Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: -Scott on September 24, 2017, 09:07:22 PM

Title: Error with SMF Upgrade Utility
Post by: -Scott on September 24, 2017, 09:07:22 PM
Getting the error below going from last version of smf 1 to smf 2 with the upgrade utility. Any help to get past this step would be appreciated.

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 upgrade script 2 of 2.
Executing: "Adding permission profiles for boards." (16 of 42 - of this script)

Error!
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id_board IN (123,266,346,325,31,56,186,187,62,63,119,121,72,151,267,51,122' at line 3



MySQL version: 5.6.37
PHP: 5.6.31
Server version: Apache
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 24, 2017, 10:57:19 PM
Which 1.1 version are you upgrading from?
Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 24, 2017, 11:17:33 PM
Crap I can't look now. Pretty sure it was up to the last update 1.1.21
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 24, 2017, 11:22:38 PM
If you're not at 1.1.21, try upgrading to .21, if it works, then upgrade to 2.0.14.
Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 24, 2017, 11:33:08 PM
Error right away.


Upgrading...
Updating Settings.php... Successful.
Backing up old table data... Unsuccessful!
This query:
CREATE TABLE backup_smf_approval_queue
TYPE=MyISAM CHARACTER SET latin1
SELECT *
FROM smf_approval_queue;
Caused the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM CHARACTER SET latin1
SELECT *
FROM smf_approval_queue' at line 2
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 24, 2017, 11:42:19 PM
Is your forum running? Link?
Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 24, 2017, 11:45:37 PM
Locked in Maint mode  :(
http://www.myfishfinder.com/fishing_forum/
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 24, 2017, 11:49:35 PM
That's not the maintenance mode page.  Can you get it out of maint mode?  Look in Settings.php, do this -



$maintenance = '0';



Would like to see what you have.

Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 24, 2017, 11:54:16 PM
Was 2 I changed to 0
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 24, 2017, 11:59:26 PM
You may have a partially upgraded database.  Did you make a backup before you did upgrade?
Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 25, 2017, 12:02:19 AM
Yes I checked the backup box. I'm out of my element with the database stuff  :'(
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 25, 2017, 12:10:52 AM
The backup option in the upgrade script creates a set of backup tables in the database before it upgrades the 1.1.21 tables to 2.0.14.  If you didn't do a proper backup before you started, and your host doesn't do automatic daily backups, you'll have to fix the damaged db by dropping the primary tables and renaming the _bak_ tables to restore the database to 1.1.21.   
Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 25, 2017, 12:17:32 AM
I don't want to screw this up further. Going to use the charter membership help with install.
btw cool nickname

Thanks a bunch sir!
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 25, 2017, 12:24:06 AM
Good luck with that.  Am no longer on the team, so can't help you there.  If you can pm cpanel access (url/username/password) will take a look, but will be going offline shortly.
Title: Re: Error with SMF Upgrade Utility
Post by: Steve on September 25, 2017, 09:21:06 AM
You can trust Sir Osis. Let him help you if he's willing.
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 26, 2017, 12:32:52 AM
Interesting mess.  As per previous posts, upgrade failed, forum loads but links don't work.   Forum files were a mix of 1.1.x files, backup tables in database were apparently from 1.1.9 install (it's a very old forum), current tables were from partial 2.0.14 upgrade.  Dropped them, restored backup tables, got forum running in 1.1.9, upgraded successfully to 1.1.21.  Ran 2.0.14 upgrade, got this error about 60% through -



You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id_board IN (123,266,346,325,31,56,186,187,62,63,119,121,72,151,267,51,122' at line 3



Different error than OP posted above when he attempted upgrade.  Restarted upgrade to run from last completed step, finished successfully.  Forum came up in old 1.0 RC5 theme, after some dicking around, managed to get into Curve, but mainmenu was borked.  Had to go offline at that point, just got back to it now.  Tonight did clean 2.0.14 install in different directory, linked to upgraded database.  Problem with themes, would not switch from Curve to Core properly.  Cleared cache, tried again, same problem, lot of files in cache again.  Checked cache setting, it was at level 3, disabled it, cleared cache, Curve and Core now working/switching normally. 

That's the background.  Forum is running here (http://www.myfishfinder.com/fishing_forum/).  Everything seems to be working, but there are several minor glitches, don't know if they're significant:

- In Admin -> Support and Credits, we're seeing this -

   Version Information:
   Forum version: SMF 2.0.14 (more detailed)
   Current SMF version: [object HTMLPhraseElement]
   GD version: bundled (2.1.0 compatible)
   MySQL version: 5.6.37
   PHP: 5.6.31
   Server version: Apache

- In Admin -> Administration Center we're seeing this -

   You are unable to connect to simplemachines.org's latest news file.

   My forums are connecting to news normally.

- In Admin -> Themes and Layout, the theme select dropdown shows this -

   Default
   Core Theme

   Should show this -

   SMF Default Theme - Curve
   Core Theme


Wouldn't be concerned by any of this if the upgrade had run without error, but the original database was damaged, and there was a mysql error during upgrade, so anything out of the ordinary is worrisome.  Any input would be appreciated.

Might also be helpful if a mod could mark this not solved.
Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 26, 2017, 11:46:38 AM
This seems to have fixed itself overnight.  :D Thanks!

- In Admin -> Support and Credits, we're seeing this -

   Version Information:
   Forum version: SMF 2.0.14 (more detailed)
   Current SMF version: [object HTMLPhraseElement]
   GD version: bundled (2.1.0 compatible)
   MySQL version: 5.6.37
   PHP: 5.6.31
   Server version: Apache

- In Admin -> Administration Center we're seeing this -

   You are unable to connect to simplemachines.org's latest news file.
Title: Re: Error with SMF Upgrade Utility
Post by: Sir Osis of Liver on September 26, 2017, 04:55:30 PM
Hell, I'm even smarter than I thought. :)

You should get friendly with database backup, there's a backup utility in cpanel, lets you download gzip of your database.  Use it regularly.

Couple of huge server error logs you can delete - /public_html/error_log_sav (289mb) and /public_html/fishing_forum_sav/error_log_sav (245mb).  You're currently logging a few server errors from the portal, and your forum error log has quite a few password errors, portal errors, various undefined index errors.  You'll want to keep an eye on that when you've finished setting up everything.

There's an FTP account in cpanel and admin account in forum for Sir Osis, you may want to remove them if we're done.

Good luck with your forum. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fthu.gif&hash=f4392e100b91a27ad55c137fafc83bec6aefd9cf)
Title: Re: Error with SMF Upgrade Utility
Post by: -Scott on September 26, 2017, 05:05:08 PM
Will do. Super big thanks for the help Sir! Sorry about that interesting mess.  :-[
Title: Re: Error with SMF Upgrade Utility
Post by: Steve on September 27, 2017, 09:44:26 AM
Quote from: Sir Osis of LiverĀ on September 26, 2017, 04:55:30 PMHell, I'm even smarter than I thought. :)

Oh lord ... that's going to require an extra 6-pack for you. :P