News:

Wondering if this will always be free?  See why free is better.

Main Menu

1.1.21 to 2.1 RC2 upgrade problem

Started by rclancy, June 10, 2019, 07:14:03 PM

Previous topic - Next topic

rclancy

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!

Sir Osis of Liver

Upgrade 1.1.21 -> 2.0.15 -> 2.1 RC2
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

rclancy

Thanks, I was wondering if that was too big of a jump.

rclancy

#3
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......

albertlast


rclancy

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.

albertlast

PR = pullrequest,
so it's contain an amount of changes.

for smf 2.1 is recommanded mysql version 8.0 or newer.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

rclancy

#8
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.

rclancy

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.

Sir Osis of Liver

That will happen if database contains incorrect paths, upgrader can't find files it needs.  You have to run repair_serttings.php.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

rclancy

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! :-[

rclancy

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!

albertlast

Can you check if the row already exists:

select * from smf_attachments where ID_ATTACH = 9923;

rclancy

#14
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.

albertlast

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;

rclancy

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.

Sir Osis of Liver

Some servers will not allow 777, it's blocked for security reasons.  Dirs/files should be 755/644.

Who is your host?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

rclancy

#18
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!

rclancy

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?

Advertisement: