News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

2.0.14 to 2.0.15 upgrade, database different version error

Started by N!c0, November 24, 2017, 07:05:14 AM

Previous topic - Next topic

N!c0

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

Sir Osis of Liver

Why did you run upgrade.php?  You can upgrade from 2.0.14 to .15 in package manager.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

N!c0

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


drewactual

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). 

shawnb61

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

shawnb61

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:
/**
* 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

shawnb61

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

N!c0


crazyASD


Aleksi "Lex" Kilpinen

Hi N!c0 is this still an issue, or have you been able to work this out?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: