Advertisement:

Author Topic: 2.0.14 to 2.0.15 upgrade, database different version error  (Read 609 times)

Offline N!c0

  • Semi-Newbie
  • *
  • Posts: 12
    • Laser Game Evolution
2.0.14 to 2.0.15 upgrade, database different version error
« on: November 24, 2017, 07:05:14 AM »
Hello,

I have the same problem (https://www.simplemachines.org/community/index.php?topic=557246.0)

Content of the file Sources/Subs-Admin.php line 79 and 80:
$ versions ['db_engine'] = array ('title' => sprintf ($ txt ['database_server'], $ smcFunc ['db_title']), 'version' => '');
$ versions ['db_engine'] ['version'] = $ smcFunc ['db_get_engine'] ();

Packages installed:
- Add security verification to the Login page (version 1.1)
- DisableTemplateEval (version 1.2)
- notCaptcha (version 1.06)
- Stop Spammer (version 2.3.9)
- cb|Emailogin (version 0.6)


I executed upgrade.php

The error message remains the same, but the "note" has disappeared

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,082
  • 'Tis the gift to be simple
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #1 on: November 24, 2017, 11:44:45 AM »
Why did you run upgrade.php?  You can upgrade from 2.0.14 to .15 in package manager.

Offline N!c0

  • Semi-Newbie
  • *
  • Posts: 12
    • Laser Game Evolution
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #2 on: November 24, 2017, 12:17:55 PM »
I have upgrade with PackerManager.

After, I have this error :

Unknown system variable 'version_comment'
File: ..../Sources/Subs-Admin.php
Line: 80

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.


After upgrade.php

Error :
Unknown system variable 'version_comment'
File: .../Sources/Subs-Admin.php
Line: 80


Offline drewactual

  • Jr. Member
  • **
  • Posts: 101
    • College Football Fan Site CFB51
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #3 on: November 24, 2017, 12:50:51 PM »
it may be a red herring... it's been a long while, but i've seen something like this before and it was a simple manual change of the line that denotes the DB version...

i suspect that the change of that line during update didn't happen because the line wasn't where the manager expected it- due to another change to the file by a mod (some do this for certain)..

if you ran the upgrade.php you may want to make sure you absolutely ran the RIGHT upgrade.php, which is one reason to avoid running it independently... and go look and see what version it printed (or failed to print due to location of that line). 
https://www.cfb51.com is a College Football Fan Site, Store, and Publisher, launched in July of 2017

Offline shawnb61

  • Support Specialist
  • Full Member
  • *
  • Posts: 508
    • sbulen on GitHub
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #4 on: November 24, 2017, 01:33:46 PM »
What version of MySQL are you running?

You can view this under Admin | Support & credits. 

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

Offline shawnb61

  • Support Specialist
  • Full Member
  • *
  • Posts: 508
    • sbulen on GitHub
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #5 on: November 24, 2017, 01:52:40 PM »
There are old reports of this being a mysql bug, e.g.:
https://bugs.mysql.com/bug.php?id=15684

The SMF code that is being invoked is in DBExtra-mysql.php:
Code: [Select]
/**
 * Figures out if we are using MySQL, Percona or MariaDB
 *
 * @return string The database engine we are using
*/
function smf_db_get_engine()
{
global $smcFunc;
static $db_type;

if (!empty($db_type))
return $db_type;

$request = $smcFunc['db_query']('', 'SELECT @@version_comment');
list ($comment) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

// Skip these if we don't have a comment.
if (!empty($comment))
{
if (stripos($comment, 'percona') !== false)
return 'Percona';
if (stripos($comment, 'mariadb') !== false)
return 'MariaDB';
}
else
return 'fail';

return 'MySQL';
}

So I suspect that the proper fix is to patch/upgrade mysql. 

If that is impractical at this time, I'm sure we can come up with a temporary workaround.

In the meanwhile, to confirm, please provide your MySQL version. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline shawnb61

  • Support Specialist
  • Full Member
  • *
  • Posts: 508
    • sbulen on GitHub
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #6 on: November 24, 2017, 02:23:20 PM »
Note there may be no rush - ONLY THE FIRST TWO admin functions make this call - things like administration center, support & credits. 

Package manager and News/Newsletters will work, and I believe everything else under Configuration, Forum, Members & Maintenance. 

Give it a shot.  This may not be very limiting at all... 

(note - this info is also copied on the 'sister' thread where another user is having the same issue:
https://www.simplemachines.org/community/index.php?topic=557246.msg3949111#new
)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline N!c0

  • Semi-Newbie
  • *
  • Posts: 12
    • Laser Game Evolution
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #7 on: November 27, 2017, 02:23:39 AM »
Hello,

MySQL version : 5.5.31

Offline crazyASD

  • Semi-Newbie
  • *
  • Posts: 23
Re: 2.0.14 to 2.0.15 upgrade, database different version error
« Reply #8 on: November 29, 2017, 05:06:05 AM »
Same error, my version mysqli: 5.7.11-log