upgrade to mariadb 10 and question marks

magj

Active Member
Dec 20, 2013
35
0
6
Germany
cPanel Access Level
Root Administrator
Hi
I have a cpanel server which I tried to upgrade the mysql to mariadb 10, now everything works except many joomla 1.5 websites which were using unicode languages are now displaying question mark instead of every character:

??????????????? ?????????

There are tens of this kind of website.

I took a look, the data is ok on databases (via phpmyadmin).

Any help would be greatly appreciated.
 
Last edited:

magj

Active Member
Dec 20, 2013
35
0
6
Germany
cPanel Access Level
Root Administrator
I asked in joomla and mariadb forum and no answers so I inspected and found the issue, I post here so if any site administrator needs to benefit the mariadb 10 for even older and non-supported versions of joomla can use this quick fix.

hope it helps

in
Code:
libraries/joomla/database/database/mysql.php
or (depending on your setting)
Code:
libraries/joomla/database/database/mysqli.php
comment the line 186

Code:
return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
and add this instead(assuming these days you'll have unicode supported database:
Code:
   return (1);
the code looks like:
Code:
function hasUTF()
   {
     $verParts = explode( '.', $this->getVersion() );
   //   return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
   return (1);
   }
Best
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello :)

I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
 

magj

Active Member
Dec 20, 2013
35
0
6
Germany
cPanel Access Level
Root Administrator
Hello :)

I'm also happy to overcome this (then-horrible) issue.

I think there are hundreds of thousands of Joomla 1.5 websites there so the servers should not wait to see them upgraded to be able to use new versions of Database.

Best