Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: sonnyh on March 16, 2020, 01:55:47 PM

Title: database may require an upgrade error
Post by: sonnyh on March 16, 2020, 01:55:47 PM
I have been seeing this error: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.17, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.

Where can I get the latest version of upgrade.php, or how do I update the database?
Title: Re: database may require an upgrade error
Post by: Illori on March 16, 2020, 02:00:57 PM
what is the above error?

there are no database changes that would fix this issue by running the upgrade script.
Title: Re: database may require an upgrade error
Post by: Kindred on March 17, 2020, 11:15:42 AM
more specifically, that part of the error message is a red herring.

Please provide the rest of the error message which has the actual problem.
Title: Re: database may require an upgrade error
Post by: sonnyh on March 19, 2020, 09:00:12 AM
This error happens when adding new forum member.
The new forum member is properly registered

Database Error
MySQL server has gone away
File: /home/rmarsorg/domains/r5mars.org/public_html/smf/Sources/ManageRegistration.php
Line: 181

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.17, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: database may require an upgrade error
Post by: Illori on March 19, 2020, 09:03:18 AM
for that error you would need to reach out to your host for them to look into the issue.
Title: Re: database may require an upgrade error
Post by: sonnyh on March 19, 2020, 09:42:08 AM
Line 181 is is in red

   // Basic stuff.
   $context['sub_template'] = 'admin_register';
   $context['page_title'] = $txt['registration_center'];

   // Load the assignable member groups.
   if (allowedTo('manage_membergroups'))
   {
      $request = $smcFunc['db_query']('', '
         SELECT group_name, id_group
         FROM {db_prefix}membergroups
         WHERE id_group != {int:moderator_group}
            AND min_posts = {int:min_posts}' . (allowedTo('admin_forum') ? '' : '
            AND id_group != {int:admin_group}
            AND group_type != {int:is_protected}') . '
            AND hidden != {int:hidden_group}
         ORDER BY min_posts, CASE WHEN id_group < {int:newbie_group} THEN id_group ELSE 4 END, group_name',
         array(
            'moderator_group' => 3,
            'min_posts' => -1,
            'admin_group' => 1,
            'is_protected' => 1,
            'hidden_group' => 2,
            'newbie_group' => 4,
         )
      );
      $context['member_groups'] = array(0 => $txt['admin_register_group_none']);
      while ($row = $smcFunc['db_fetch_assoc']($request))
         $context['member_groups'][$row['id_group']] = $row['group_name'];
      $smcFunc['db_free_result']($request);
   }
   else
      $context['member_groups'] = array();
}
Title: Re: database may require an upgrade error
Post by: Illori on March 19, 2020, 10:09:41 AM
the code does not matter. the error means you HAVE to contact your host.
Title: Re: database may require an upgrade error
Post by: Sir Osis of Liver on March 19, 2020, 05:48:59 PM
Look in Admin -> Support and Credits, what's the version information?