mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Improve server environment display
This commit is contained in:
parent
954d2c7ec6
commit
4ee115e4f3
10 changed files with 186 additions and 210 deletions
|
|
@ -112,6 +112,7 @@ class DB
|
|||
* @var string
|
||||
*/
|
||||
public $db_type;
|
||||
public $db_version = '';
|
||||
|
||||
/**
|
||||
* flag to decide if class prepared statements or not (when supported); can be changed from db.config.info
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ class DBCubrid extends DB
|
|||
return;
|
||||
}
|
||||
|
||||
$this->db_version = __CUBRID_VERSION__;
|
||||
cubrid_set_autocommit($result, CUBRID_AUTOCOMMIT_TRUE);
|
||||
|
||||
return $result;
|
||||
|
|
|
|||
|
|
@ -74,13 +74,13 @@ class DBMssql extends DB
|
|||
|
||||
$server_info = sqlsrv_server_info($result);
|
||||
$server_version = $server_info['SQLServerVersion'];
|
||||
$this->db_version = $server_version;
|
||||
if ($server_version && version_compare($server_version, '10', '<'))
|
||||
{
|
||||
$this->setError(-1, 'Rhymix requires Microsoft SQL Server 2008 or later. Current version is ' . $server_version);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,9 +78,10 @@ class DBMysql extends DB
|
|||
}
|
||||
|
||||
// Error appears if the version is lower than 5.0.7
|
||||
if(version_compare(mysql_get_server_info($result), '5.0.7', '<'))
|
||||
$this->db_version = mysql_get_server_info($result);
|
||||
if(version_compare($this->db_version, '5.0.7', '<'))
|
||||
{
|
||||
$this->setError(-1, 'Rhymix requires MySQL 5.0.7 or later. Current MySQL version is ' . mysql_get_server_info());
|
||||
$this->setError(-1, 'Rhymix requires MySQL 5.0.7 or later. Current MySQL version is ' . $this->db_version);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class DBMysqli extends DBMysql
|
|||
return;
|
||||
}
|
||||
$this->charset = isset($connection['charset']) ? $connection['charset'] : 'utf8';
|
||||
$this->db_version = $result->server_info;
|
||||
mysqli_set_charset($result, $this->charset);
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue