Jump to content

Anyone know the MYSQL collation for version 3 of cubecart?


Recommended Posts

Hi Everyone,

We have a client with a very old version of cubecart that is not working and just need to get it going to update it.

I have changed the PHP version for his site to 5.6 but getting this error when trying to load the site

MySQL Error Occured
2054: Server sent charset unknown to the client. Please, report to the developers

Can anyone tell me the correct charset for this version?

Link to comment
Share on other sites

Welcome garydes! Glad to see you made it to the forums.

The easiest fix, if you can do it, is to migrate the database that CC3 is using back to MySQL 5.6 (as opposed to what is most likely MySQL 8).

One might think to upgrade PHP to v7 for CC3 but that will introduce numerous incompatibilities.

Keep in mind that an "upgrade" is "whole-cloth". That is, (almost) everything gets replaced. Please see:


It is important that /includes/global.inc.php is not deleted, as well as the other three things to not delete in the deletion step.

Or are you wanting to upgrade CC3 to the latest version of the CC3 family? (CC3.0.21)

You will still have problems/concerns because even the latest version of CC3 does not work completely free of issues with PHP 5.6, and has major issues with PHP 7.

The MySQL document page:

About halfway down the page:
Important change: The default character set has changed from latin1 to utf8mb4.

According to:


You might be able to set the server for latin1 by making this edit:

In the file /classes/db.inc.php, find:

	function db()
		global $glob;
		$this->db = mysqli_connect($glob['dbhost'], $glob['dbusername'], $glob['dbpassword'], $glob['dbdatabase']);
		if (!$this->db) die ($this->debug('connect'));

Add after:

		mysqli_set_charset($this-db, 'latin1');

(I haven't tested any of this.)

Even so, the error may be getting generated immediately during the connection to the database -- mysqli_connect() -- where executing the mysqli_set_charset() is too late. If so, one will need to reconfigure the database server itself, such as this article details:



Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...