Diagnostic Tool Fix

Disclaimer: I’m not a PHP, MySQL or developer guru, so this might be the wrong way to handle this. Environment is Ubuntu 14.0.3 LTS, Apache 2, php 5.5.9, mysql 5.5

TLDR: Diagnostic Tool works again when you change line 359 in the ‘include/database/MysqliManager.php’
from:


"MySQLi Client Encoding" =>  @mysql_client_encoding($this->database),

To:


"MySQLi Client Encoding" =>  @mysqli_character_set_name($this->database),

Long Version:
I was having problems with the Diagnostic Tool failing at 15%. After searching the forum and internet with no success, I found the SugarCRM bug which hinted at the mysqli_client_encoding function.

After some quick reading, it appears the MysqliManager.php class has a function which is responsible for returning the client encoding information from the MySQL database. The problem is when ‘mysql_client_encoding’ is called with a ‘mysqli_connect’ function, it dies with a


Warning: mysql_client_encoding() expects parameter 1 to be resource, object given in <your file path and line number>

Even with error reporting turned on, the ‘@’ symbol in ‘@mysql_client_encoding’ was suppressing the error messages, so that’s why it didn’t show up on screen or in the logs.

More Reading:
PHP documentation for mysql_client_encoding
PHP documentation for mysqli_client_encoding