Advertisement:

Author Topic: 1.1.21 to 2.1 RC2 upgrade problem  (Read 1496 times)

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
1.1.21 to 2.1 RC2 upgrade problem
« 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!

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,294
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #1 on: June 10, 2019, 07:43:20 PM »
Upgrade 1.1.21 -> 2.0.15 -> 2.1 RC2

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #2 on: June 10, 2019, 08:24:42 PM »
Thanks, I was wondering if that was too big of a jump.

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #3 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......
« Last Edit: June 11, 2019, 10:12:40 AM by rclancy »

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 589
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #4 on: June 11, 2019, 10:55:02 AM »

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #5 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.

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 589
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #6 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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,294
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #7 on: June 11, 2019, 04:09:16 PM »
Did you get to 2.0?

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #8 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.
« Last Edit: June 11, 2019, 05:31:17 PM by rclancy »

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #9 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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,294
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #10 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.

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #11 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! :-[

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #12 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!

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 589
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #13 on: June 12, 2019, 02:08:38 PM »
Can you check if the row already exists:
Code: [Select]
select * from smf_attachments where ID_ATTACH = 9923;

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #14 on: June 12, 2019, 02:37:22 PM »
Yup, it's there.





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.
« Last Edit: June 12, 2019, 03:00:11 PM by rclancy »

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 589
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #15 on: June 12, 2019, 03:13:17 PM »
You could try this,
in you 1-1 upgrade file
search for:
Code: [Select]
$thumb_attach_id = smf_mysql_insert_id();
and replace it with:
Code: [Select]
$thumb_attach_id = smf_mysql_insert_id();
if(empty($thumb_attach_id)) continue;

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #16 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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,294
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #17 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?

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #18 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!
« Last Edit: June 12, 2019, 10:44:47 PM by rclancy »

Offline rclancy

  • Semi-Newbie
  • *
  • Posts: 15
Re: 1.1.21 to 2.1 RC2 upgrade problem
« Reply #19 on: June 13, 2019, 09:53:16 AM »
Here's where the problem happens....


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?