Advertisement:

Author Topic: SMF 2.1 RC3 upgrade error  (Read 901 times)

Offline Massl

  • Jr. Member
  • **
  • Posts: 323
Re: SMF 2.1 RC3 upgrade error
« Reply #20 on: October 16, 2020, 07:25:55 PM »
I can't login so the queries aren't showed  :(

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,386
    • sbulen on GitHub
Re: SMF 2.1 RC3 upgrade error
« Reply #21 on: October 16, 2020, 07:42:39 PM »
The htmlspecialchars error might be a symptom, but it's not the problem.  I would put the RC3 code back. 

The error message you are getting indicates a DB query is failing.  Unfortunately, the query appears to have something to do with logging on.  And it is apparently not being logged in smf_log_errors, since above you indicated you only saw the htmlspecialchars error.

So...  Let's get the DB to cough the error up. 

Either at a mysql prompt or in phpmyadmin in the SQL window, enable logging as follows:
Code: [Select]
SET global general_log = 1;
SET global log_output = 'table';

After issuing the above commands, try to login to get the error again.

Then, issue the following:
Code: [Select]
select * from mysql.general_log;
We are looking in there for a query that failed...


(Note that
Code: [Select]
SET global log_output = 'file'; is much easier to read (e.g., in Notepad++), but, then you have to poke around in your mysql config file to figure out where that log is hiding...)

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 52,600
Re: SMF 2.1 RC3 upgrade error
« Reply #22 on: October 16, 2020, 07:52:56 PM »
this seems to have been reported in the past, but not many were able to duplicate the issue..

seems the old issues were related to registering it seems, but leaving this here anyway.

We can close this topic, i found the solution.

Many thanks to Sir Osis and Arantor: yes, I can see your accounts!

Mistake: in section "spam" the number of questions has been set to 1, but no questions has been defined. After setting to 0 signing in was possible just with solving the picture. Setting to 1 and definig a questions works too.

Thank you very much!

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,386
    • sbulen on GitHub
Re: SMF 2.1 RC3 upgrade error
« Reply #23 on: October 16, 2020, 07:54:46 PM »
Another query you can do from either a mysql prompt or in the phpmyadmin SQL window is this:
Code: [Select]
select * from mysql.user
Two things to look for, specifically, for the DB user you use in your Settings.php file:
(1) Are all the privileges checked with a "Y"
(2) Is the plugin column set to 'mysql_native_password'
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Massl

  • Jr. Member
  • **
  • Posts: 323
Re: SMF 2.1 RC3 upgrade error
« Reply #24 on: October 17, 2020, 03:12:24 AM »
Then, issue the following:
Code: [Select]
select * from mysql.general_log;

Code: [Select]
('2020-10-17 08:59:38.899609', 'root[root] @ localhost [::1]', 782, 1, 'Query', 'SELECT passwd, id_member, id_group, lngfile, is_activated, email_address, additional_groups, member_name, password_salt,\n passwd_flood, tfa_secret\n FROM smf_members\n WHERE member_name = \'admin\'\n LIMIT 1'),
('2020-10-17 08:59:39.375831', 'root[root] @ localhost [::1]', 782, 1, 'Query', 'UPDATE smf_members\n SET password_salt = \'499dc555e005d57799dc530c273b3c66\'\n WHERE id_member = 2'),
('2020-10-17 08:59:39.376347', 'root[root] @ localhost [::1]', 782, 1, 'Prepare', 'INSERT INTO smf_log_errors\n (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace)\n VALUES( ?, ?, unhex(?), ?, ?, ?, ?, ?, ?, ?)'),
('2020-10-17 08:59:39.376635', 'root[root] @ localhost [::1]', 782, 1, 'Execute', 'INSERT INTO smf_log_errors\n (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace)\n VALUES( 0, 1602917979, unhex(\'00000000000000000000000000000001\'), \'?action=login2\', \'Database Error: Data too long for column \\\'password_salt\\\' at row 1\', \'c01a1e8f9fd34a22c5884165e4fb0f6e\', \'database\', \'C:/wamp/www/Sources/Subs.php\', 412, \'[{\\\"file\\\":\\\"C:\\\\\\\\wamp\\\\\\\\www\\\\\\\\Sources\\\\\\\\Subs-Db-mysql.php\\\",\\\"line\\\":489,\\\"function\\\":\\\"smf_db_error\\\",\\\"args\\\":[\\\"\\\\n\\\\t\\\\tUPDATE smf_members\\\\n\\\\t\\\\tSET password_salt = \\\'499dc555e005d57799dc530c273b3c66\\\'\\\\n\\\\t\\\\tWHERE id_member = 2\\\",{\\\"affected_rows\\\":null,\\\"client_info\\\":null,\\\"client_version\\\":null,\\\"connect_errno\\\":null,\\\"connect_error\\\":null,\\\"errno\\\":null,\\\"error\\\":null,\\\"error_list\\\":null,\\\"field_count\\\":null,\\\"host_info\\\":null,\\\"info\\\":null,\\\"insert_id\\\":null,\\\"server_info\\\":null,\\\"server_version\\\":null,\\\"stat\\\":null,\\\"sqlstate\\\":null,\\\"protocol_version\\\":null,\\\"thread_id\\\":null,\\\"warning_count\\\":null}]},{\\\"file\\\":\\\"C:\\\\\\\\wamp\\\\\\\\www\\\\\\\\Sources\\\\\\\\Subs.php\\\",\\\"line\\\":412,\\\"function\\\":\\\"smf_db_query\\\",\\\"args\\\":[\\\"\\\",\\\"\\\\n\\\\t\\\\tUPDATE smf_members\\\\n\\\\t\\\\tSET password_salt = \\\'499dc555e005d57799dc530c273b3c66\\\'\\\\n\\\\t\\\\tWHERE id_member = 2\\\",{\\\"member\\\":\\\"2\\\",\\\"p_password_salt\\\":\\\"499dc555e005d57799dc530c273b3c66\\\"}]},{\\\"file\\\":\\\"C:\\\\\\\\wamp\\\\\\\\www\\\\\\\\Sources\\\\\\\\LogInOut.php\\\",\\\"line\\\":405,\\\"function\\\":\\\"updateMemberData\\\",\\\"args\\\":[\\\"2\\\",{\\\"password_salt\\\":\\\"499dc555e005d57799dc530c273b3c66\\\"}]},{\\\"file\\\":\\\"C:\\\\\\\\wamp\\\\\\\\www\\\\\\\\index.php\\\",\\\"line\\\":173,\\\"function\\\":\\\"Login2\\\",\\\"args\\\":[]}]\')'),
('2020-10-17 08:59:39.376785', 'root[root] @ localhost [::1]', 782, 1, 'Query', 'SELECT COUNT(id_error)\n FROM smf_log_errors'),

Note that the forum was converted from MyBB and then updated to RC2.

Another query you can do from either a mysql prompt or in the phpmyadmin SQL window is this:
Code: [Select]
select * from mysql.user
Two things to look for, specifically, for the DB user you use in your Settings.php file:
(1) Are all the privileges checked with a "Y"
(2) Is the plugin column set to 'mysql_native_password'

(1) Yes
(2) No


Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,386
    • sbulen on GitHub
Re: SMF 2.1 RC3 upgrade error
« Reply #25 on: October 17, 2020, 10:43:47 AM »
Ahhhhh....

Can you share the structure of your members table?  All columns, datatypes, lengths, collations?

Also, what are the primary languages used in your forum? 
« Last Edit: October 17, 2020, 10:56:27 AM by shawnb61 »
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Massl

  • Jr. Member
  • **
  • Posts: 323
Re: SMF 2.1 RC3 upgrade error
« Reply #26 on: October 17, 2020, 01:22:19 PM »
Can you share the structure of your members table?  All columns, datatypes, lengths, collations?

Is there an easy way to do it?

Also, what are the primary languages used in your forum?

Italian but I switched to english before upgrade.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,386
    • sbulen on GitHub
Re: SMF 2.1 RC3 upgrade error
« Reply #27 on: October 17, 2020, 01:30:39 PM »
You can just open up the table in phpmyadmin and click on the Structure tab and take a screenshot.

My current theory is your DB is somehow utf8mb4, or something other than utf8.  If your forum was working fine in RC2, I suspect the backup/restore changed the collations & charsets somehow. 

I would restore, but make sure you are utf8, not utf8mb4, before doing the upgrade.  It may help to create the empty DB and change the default collation to utf8_general_ci before doing the restore.  THEN upgrade...

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,386
    • sbulen on GitHub
Re: SMF 2.1 RC3 upgrade error
« Reply #28 on: October 17, 2020, 01:53:34 PM »
Scrolling to the bottom, so you can see password_salt, it should look something like the attached...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Massl

  • Jr. Member
  • **
  • Posts: 323
Re: SMF 2.1 RC3 upgrade error
« Reply #29 on: October 18, 2020, 05:04:55 AM »

After changing varchar(8) to varchar(255), like in your picture, I can login again  ;D

I have password_salt varchar(8) also on live site, it would be better to increase it during the update process.

Thanks for your help shawnb61  :)

PS. Undefined index: htmlspecialchars . Error 500 even updating the live site, solved by deleting upgrade files.
« Last Edit: October 18, 2020, 06:07:14 AM by Massl »

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,386
    • sbulen on GitHub
Re: SMF 2.1 RC3 upgrade error
« Reply #30 on: October 18, 2020, 11:46:11 AM »
Note that the forum was converted from MyBB and then updated to RC2.

Ahhhhh.....
https://github.com/SimpleMachines/converters/blob/90b914f19ff126f1979660ef1de1ab3ea8a90fb8/SMF2.0/MyBB/1.8/mybb18x_to_smf.sql#L20

It all makes perfect sense now.  Thank you for your patience.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,948
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF 2.1 RC3 upgrade error
« Reply #31 on: October 18, 2020, 12:01:13 PM »
Will make the change with the convertors to go to 255. in the few cases it was changed.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,386
    • sbulen on GitHub
Re: SMF 2.1 RC3 upgrade error
« Reply #32 on: October 18, 2020, 01:32:56 PM »
I have password_salt varchar(8) also on live site, it would be better to increase it during the update process.


With vbgamer45's help, converters were addressed here:
https://github.com/SimpleMachines/converters/pull/5

And making the upgrader a little smarter is in the works here:
https://github.com/SimpleMachines/SMF2.1/pull/6306
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp