/** * Retrieve server version in PHP style * * @return string */ public function getServerVersion() { $this->_connect(); $version = sqlsrv_client_info($this->_connection); if ($version !== false) { return $version['DriverVer']; } return null; }
/** * Returns the libary version string. * * @return string */ public function client_version() { $client_info = sqlsrv_client_info($this->conn); return $client_info['DriverODBCVer'] . ' ' . $client_info['DriverVer']; }
/** * SQL Server check for client version * * @TODO Get this to actually check the client version. * * {@inheritDoc} */ public function verifyClientVersion() { return array('result' => 'success', 'message' => $this->install->lexicon('sqlsrv_version_client_success',array('version' => ''))); $clientInfo = @sqlsrv_client_info(); $sqlsrvVersion = $clientInfo['DriverVer']; $sqlsrvVersion = $this->_sanitizeVersion($sqlsrvVersion); if (empty($sqlsrvVersion)) { return array('result' => 'warning','message' => $this->install->lexicon('sqlsrv_version_client_nf'),'version' => $sqlsrvVersion); } $sqlsrv_ver_comp = version_compare($sqlsrvVersion,'10.50.0','>='); if (!$sqlsrv_ver_comp) { return array('result' => 'warning','message' => $this->install->lexicon('sqlsrv_version_client_old',array('version' => $sqlsrvVersion)),'version' => $sqlsrvVersion); } else { return array('result' => 'success','message' => $this->install->lexicon('sqlsrv_version_success',array('version' => $sqlsrvVersion)),'version' => $sqlsrvVersion); } }
/** * (non-PHPdoc) * @see DBManager::getDbInfo() * @return array */ public function getDbInfo() { $info = array_merge(sqlsrv_client_info(), sqlsrv_server_info()); return $info; }
/** * Returns an associative array with keys described in the table below. Returns FALSE otherwise. * ================================================== * Key Description * ================================================== * DriverDllName SQLNCLI10.DLL * DriverODBCVer ODBC version (xx.yy) * DriverVer SQL Server Native Client DLL version (10.5.xxx) * ExtensionVer php_sqlsrv.dll version (2.0.xxx.x) * @return multitype: */ public function getClientInfo() { return sqlsrv_client_info($this->dbconnection); }
/** * @depends testConnection */ public function testClientInfo($con) { echo "\nClient Info function test.\n"; // TODO: make better tests $client_info = sqlsrv_client_info($con); urp::info($client_info); $this->assertTrue(is_array($client_info)); }
/** * (non-PHPdoc) * @see DBManager::getDbInfo() * @return array */ public function getDbInfo() { $info = array_merge(sqlsrv_client_info($this->database), sqlsrv_server_info($this->database)); return $info; }
function cs_sql_version($cs_file) { global $cs_db; $sql_infos = array('data_free' => 0, 'data_size' => 0, 'index_size' => 0, 'tables' => 0, 'names' => array()); $client = sqlsrv_client_info($cs_db['con']); $server = sqlsrv_server_info($cs_db['con']); $sql_infos['encoding'] = 'default'; $sql_infos['type'] = 'Microsoft SQL Server (sqlsrv)'; $sql_infos['client'] = $client['DriverVer'] . ' - ODBC ' . $client['DriverODBCVer']; $sql_infos['host'] = $server['SQLServerName']; $sql_infos['server'] = $server['SQLServerVersion']; return $sql_infos; }