Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: rclancy on June 10, 2019, 07:14:03 PM

Title: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 10, 2019, 07:14:03 PM
Thanks to help here, I ........
-- duplicated the 1.1.21 forum/database
-- edited avatar and Theme paths to get rid of permission and file not found errors

Got into the upgrader, the URL says "step 3, substep 1", the page says "Database Changes".  I get 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 '' at line 3"

Would this be in upgrade_2-1_mysql.sql  or upgrade_1-1.sql ?  In either of those, Line 3 doesn't make a lot of sense, and    [    near "   ] doesn't give much of a clue.

Thanks!
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: Sir Osis of Liver on June 10, 2019, 07:43:20 PM
Upgrade 1.1.21 -> 2.0.15 -> 2.1 RC2
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 10, 2019, 08:24:42 PM
Thanks, I was wondering if that was too big of a jump.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 11, 2019, 09:31:34 AM
Upgrading to 2.0...... making database changes, here's 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 'IGNORE TABLE smf_log_floodcontrol CHANGE COLUMN ip ip char(16) NOT NULL default' at line 1

Found it in file "upgrade_1-1.sql"  line 880, tried changing the first 'ip' to 'IP' as that's how it appeared in *some* of the nearby code lines... no help.

I'm a bit over my head with the SQL.

Here's the whole thing, as is:

---# Updating flood control log...
ALTER IGNORE TABLE {$db_prefix}log_floodcontrol
CHANGE COLUMN ip ip char(16) NOT NULL default '                ';

Thanks,
Bob

Update: ALTER IGNORE is removed from MySQL 5.7.4, and that's the first instance of it in that file.  I'm finding out exactly what flavor of 5.7 the host is running......
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: albertlast on June 11, 2019, 10:55:02 AM
Added a pr for this: https://github.com/SimpleMachines/SMF2.1/pull/5713
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 11, 2019, 11:35:29 AM
Thanks...  newbie here, 'pr'?

Anyway, I started over with MySQL5.5, as the host couldn't tell me just what specific version of 5.7 they had.  Will try the upgrade this way.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: albertlast on June 11, 2019, 11:49:10 AM
PR = pullrequest,
so it's contain an amount of changes.

for smf 2.1 is recommanded mysql version 8.0 or newer.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: Sir Osis of Liver on June 11, 2019, 04:09:16 PM
Did you get to 2.0?
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 11, 2019, 04:52:54 PM
Going to try 2.0 now, had to go to town.....

Host 1and1 has the options of mysql 5.5 (which I'm trying) and 5.7, that's all.

What a tar baby!

Update: Run upgrade.php and get errors related to the display og the page header, upgrade step, time elapsed, etc.  Workin' on it, seeing where all that's missing.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 11, 2019, 06:54:17 PM
Looks like the Theme path is not right, it can't find the text variables (titles and such)  that are declared in Install.english.php, so I bypassed them, then it complained I had old or outdated files.  The latest upgrade files are there, so I think it just can't find 'em.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: Sir Osis of Liver on June 11, 2019, 06:55:57 PM
That will happen if database contains incorrect paths, upgrader can't find files it needs.  You have to run repair_serttings.php.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 11, 2019, 09:04:00 PM
Thanks!  I just got done starting all over, double checked the SMF Admin stuff for attachment, avatar, and Theme paths, all were good.  I spoze there are other (hidden?) settings in the dbase, so I'll run repair.

If it wasn't for the good ideas here, I'd be sunk! :-[
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 12, 2019, 12:28:47 PM
Well, I ran repair_settings.php, the Smiley path was wrong, but all the other paths were right.  I changed the on/off settings to what was recommended.

Ran upgrade, it worked well, I got further than ever before, didn't have any problems right off the bat.

Got as far as "Registering thumbs...done" and got:

"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    ' width = 1000, height = 550 WHERE ID_ATTACH = 9923 LIM'    at line 3"

In upgrade_1-1.sql is:

               UPDATE {$db_prefix}attachments
               SET
                  id_thumb = $thumb_attach_id,
                  width = " . (int) $attach_width . ",
                  height = " . (int) $attach_height . "
               WHERE ID_ATTACH = $attach_id
               LIMIT 1");

So I found in smf_attachments (phpMyAdmin) attachment #9923, and it's 1000x550.  I see nothing obviously wrong with the record..... if I just deleted it, would that mess up other things, like the post where it was attached?  (I'm tired of starting over... :o )

Thanks!
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: albertlast on June 12, 2019, 02:08:38 PM
Can you check if the row already exists:

select * from smf_attachments where ID_ATTACH = 9923;
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 12, 2019, 02:37:22 PM
Yup, it's there.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.southmtpages.com%2Fklr_photos%2Fatt_9923_1.jpg&hash=8eb02adaa31c6878d6f21615277d2e2ef0d23d11)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.southmtpages.com%2Fklr_photos%2Fatt_9923_2.jpg&hash=7d52d3da58654380e07bb96e02941b80a76b5610)

I don't see why it's bombing on that one file.  FWIW, I'm upgrading a duplicate forum and  hunted down the board, topic, etc. in the database,  went back to the original forum, and found that image it's choking on.  Been there since '09.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: albertlast on June 12, 2019, 03:13:17 PM
You could try this,
in you 1-1 upgrade file
search for:

$thumb_attach_id = smf_mysql_insert_id();

and replace it with:

$thumb_attach_id = smf_mysql_insert_id();
if(empty($thumb_attach_id)) continue;
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 12, 2019, 05:09:38 PM
Changed the 1-1 file.... now, over and over, at the

"Executing: "Adjusting uploadable avatars..." (10 of 19 - of this script)"

...stage, I get a message

"Server has not responded for 30 seconds. It may be worth waiting a little longer or otherwise please click here to try this step again"

Uploadable avatars go to the /avs directory, and permissions are 777, directory is empty (in the original forum they went to the attachments directory).  I set /attachments to 777 too.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: Sir Osis of Liver on June 12, 2019, 09:40:52 PM
Some servers will not allow 777, it's blocked for security reasons.  Dirs/files should be 755/644.

Who is your host?
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 12, 2019, 10:27:52 PM
1and1/Ionos

Only /attachments and /avs were set to 777.  The rest were 705, files 604.
So I set dirs to 755 and files to 644.... same thing.

Thanks!
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 13, 2019, 09:53:16 AM
Here's where the problem happens....
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.southmtpages.com%2Fklr_photos%2Fjunk_avatars.jpg&hash=df6eb310e24d39236c9d05a0ac506bd8bf6de12c)

Turns out, in 1-1.sql, line 1061, it says "--- Adjusting uploadable avatars..." then it updates the attachments and Updates the settings... both those say "done".  The next lines are dealing with Thumbs....

/******************************************************************************/
--- Updating thumbnails...
/******************************************************************************/

---# Registering thumbs...
---{
// Checkout the current structure of the attachment table.
$request = mysqli_query("
   SHOW COLUMNS
   FROM {$db_prefix}attachments"); ................... etc.

Looks to me like it's the attachment table where it's bombing.  The table opens up fine in phpMyadmin, is 71,500 rows.  Maybe too big?
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: rclancy on June 13, 2019, 01:38:35 PM
Update: set the upgrade.php timeout from 30 seconds to 240, thinking maybe the server just needed more time.... no go.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: Sir Osis of Liver on June 13, 2019, 04:33:50 PM
Sometimes you just can't upgrade on some servers, I've seen this several times, usually on GoDaddy.  Don't recall ever working on your host.  Solution was to import database to clean install on my server, upgrade, then import it back to production server.  If you run out of options and want to go that route, drop me a pm.
Title: Re: 1.1.21 to 2.1 RC2 upgrade problem
Post by: Jarppi on September 08, 2019, 02:56:13 AM
Hello,
is there any solution for this?
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 'IGNORE TABLE log_floodcontrol CHANGE COLUMN ip ip char(16) NOT NULL default ' ' at line 1

My host changed php version that I need to use 7.2 and my smf was on 1.1.21, so trying to upgrade 2.0.15
And I'm stuck with that issue.
Host uses these versions and I cannot change those.
PHP Version   7.2.21
MySQL Version   5.7.27