Jump to content

Anyone know the MYSQL collation for version 3 of cubecart?


garydes

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:

https://support.cubecart.com/hc/en-gb/articles/360003794258-How-do-I-upgrade-from-CubeCart-v3-to-v6-

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:

https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html
About halfway down the page:
Important change: The default character set has changed from latin1 to utf8mb4.

According to:

https://dev.mysql.com/doc/refman/8.0/en/set-names.html
https://www.php.net/manual/en/mysqli.set-charset.php

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:

https://thisinterestsme.com/charset-255-unknown-mysql/

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...