SQL Error on Concrete5.2.1 When Logging In

Hi,

I’m using Concrete5.2.1 on a server running PHP 5.6 and MySQL (hosted on OVH). When I try to log in to the admin interface, I encounter the following error:

mysql error: [1064: 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 ‘Groups on UserGroups.gID = Groups.gID WHERE UserGroups.uID = ‘1’’ at line 1]
in EXECUTE(“SELECT Groups.gID, Groups.gName FROM UserGroups INNER JOIN Groups ON UserGroups.gID = Groups.gID WHERE UserGroups.uID = ‘1’”)

I’ve tried restoring the database, but the issue persists. The structure of the tables seems correct (Groups and UserGroups exist). I’m wondering if this could be related to:

  • An incompatibility between Concrete5.2.1 and a more recent MySQL version,
  • Or an issue during the database restoration process (importing from Windows to Linux).

Has anyone experienced this issue or have any suggestions on how to resolve it?

Thank you in advance!

A basic on the error:

The error 1064 occurs due to Mysql version mismatch,because different versions have different
reserved words, which if used by a previous version causes the error to occur.

The simplest and most effective solution for it is.
-when using phpMyadmin,select the “compatibility mode” & select the target db version from the drop down box.
-when using MySql administrator,while backing up choose “compatibility mode” in advanced tab ,
and while restoring through mysql administrator ,click “auto-detect file charater set” if backup was not made using mySql administrator.
the default file characer set used by mysql admministrator is utf8.

Hi,

Thank you for your suggestions. I tried using the MYSQL323 compatibility mode, but it didn’t change anything. The error still persists.

Thanks again for your help.

You should update your site to run on concrete 5.6.4
5.6.4 is compatible with the Groups reserved word and will run on php 7.4 (much faster)
Get in touch if you want this done for you as a paid job.

When I update to 5.6.4
Une erreur inattendue est survenue lors de la mise à jour: #0 /home/camillebot/www/concrete/libraries/3rdparty/adodb/adodb.inc.php(1265): adodb_throw(‘mysqli’, ‘EXECUTE’, 1064, ‘You have an err…’, ‘select * from G…’, false, Object(ADODB_mysqli)) #1 /home/camillebot/www/concrete/libraries/3rdparty/adodb/adodb.inc.php(1205): ADOConnection->_Execute(‘select * from G…’) #2 /home/camillebot/www/concrete/libraries/3rdparty/adodb/adodb.inc.php(1851): ADOConnection->Execute(‘select * from G…’, Array) #3 /home/camillebot/www/concrete/core/models/groups.php(91): ADOConnection->GetRow(‘select * from G…’, Array) #4 /home/camillebot/www/concrete/helpers/concrete/upgrade/version_560.php(576): Concrete5_Model_Group::getByID(‘1’) #5 /home/camillebot/www/concrete/helpers/concrete/upgrade/version_560.php(279): ConcreteUpgradeVersion560Helper->migrateAccessEntity(Array) #6 /home/camillebot/www/concrete/helpers/concrete/upgrade/version_560.php(251): ConcreteUpgradeVersion560Helper->addGlobalBlockPermissions() #7 /home/camillebot/www/concrete/core/controllers/single_pages/upgrade.php(276): ConcreteUpgradeVersion560Helper->run() #8 /home/camillebot/www/concrete/core/controllers/single_pages/upgrade.php(64): Concrete5_Controller_Upgrade->do_upgrade() #9 [internal function]: Concrete5_Controller_Upgrade->view(‘tools’, ‘required’, ‘upgrade.php’) #10 /home/camillebot/www/concrete/core/libraries/controller.php(267): call_user_func_array(Array, Array) #11 /home/camillebot/www/concrete/core/libraries/controller.php(237): Concrete5_Library_Controller->runTask(‘view’, Array) #12 /home/camillebot/www/concrete/core/libraries/view.php(778): Concrete5_Library_Controller->setupAndRun() #13 /home/camillebot/www/concrete/tools/upgrade.php(6): Concrete5_Library_View->render(‘/upgrade’) #14 /home/camillebot/www/concrete/startup/tools_upgrade_check.php(9): include(‘/home/camillebo…’) #15 /home/camillebot/www/concrete/dispatcher.php(108): require(‘/home/camillebo…’) #16 /home/camillebot/www/index.php(2): require(‘/home/camillebo…’) #17 {main}

Yeah, you probably tried to update directly from 5.2.1 to 5.6.4, you cannot jump from one major version to another, you need to update sequentially through the versions especially with archive versions.

In fact I have version 5.5.2 and here’s what happens when I upgrade to 5.6.0 it doesn’t change anything

I would not expect 5.6.0 to make a difference.
You need to continue stepping through the versions until you get to 5.6.3.5 and then the final step to 5.6.4.0