OK,
I've been step debugging through the installer this morning.
What a complete horror story.
First thing is in the install.php file (my comments)
// These are the same and this is what causes the issue
//$errorMsg = mysqli_error($conn); // this is set to an empty string but should be uninitialized/unset or it gets picked up by the error routines
//$mysqlErrNo = mysqli_errorno($conn); // this is unset - should be mysqli_errno
This should be something like:
if (mysqli_error($conn)){
$errorMsg = mysqli_error($conn);
}
if (mysqli_errno($conn)){
$mysqlErrNo = mysqli_errno($conn);
}
You then get $SESSION['DBINFO'] = OK so we have connected to the DB OK, but still fails.
That's when it goes running off to do a system validation.
Look at the code here that is called from checkSystem.php:
private function getMySqlVersion($host, $userName, $password)
{
$mysqli = new mysqli($host, $userName, $password);
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$currentVersion = $mysqli->server_info;
$mysqli->close();
return $currentVersion;
}
So where is the port?? checkSystem.php has the correct DB details:
$conn = @mysqli_connect($dbInfo['dbHostName'], $dbInfo['dbUserName'], $dbInfo['dbPassword'], "", $dbInfo['dbHostPort']))
But it fails to send them to the validation as it uses this line:
$systemValidator->isMySqlCompatible($dbInfo['dbHostName'], $dbInfo['dbUserName'], $dbInfo['dbPassword']))
Without the correct port etc you get Access denied. <slapshead>
Essentially they give you the option to use a different port or use a socket, and then completely ignore it all.
As a result there are other functions in there that would also need hacking.
I haven't bothered to go any further. I don't have the time, and am not getting paid to do this.
Yes, I am sure I could get it installed. Just needs stepping through and fixing the broken bits, of which there are plenty - I had to override some other hard coded $vars etc etc as well. Probably a good day or two of work as I am sure there will be other issues in there when you actually run it.
However, if that is the standard of their installer, I don't hold much hope for the rest of their spaghetti code....
(remember I am NOT a coder. Just happen to be handy at debugging)