From c4d8c23357fd871daeac4056984bb46cc30781bc Mon Sep 17 00:00:00 2001 From: David M Date: Tue, 3 Oct 2006 03:17:56 +0000 Subject: [PATCH] complete check for FB git-svn-id: file:///svn/phpbb/trunk@6433 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_install.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 34f1eda587..3f0b74320a 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1770,6 +1770,7 @@ class install_install extends module break; case 'firebird': + // check the version of FB, use some hackery if we can't get access to the server info if ($db->service_handle !== false && function_exists('ibase_server_info')) { $val = @ibase_server_info($db->service_handle, IBASE_SVC_SERVER_VERSION); @@ -1779,6 +1780,32 @@ class install_install extends module $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; } } + else + { + $sql = "SELECT * + FROM RDB$FUNCTIONS + WHERE RDB$SYSTEM_FLAG IS NULL + AND RDB$FUNCTION_NAME = 'CHAR_LENGTH'"; + $result = $db->sql_query($sql); + + // if its a UDF, its too old + if ($db->sql_fetchrow($result)) + { + $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; + } + else + { + $sql = "SELECT FIRST 0 char_length('') + FROM RDB\$DATABASE"; + $result2 = $db->sql_query($sql); + if (!$result2) // This can only fail if char_length is not defined + { + $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; + } + $db->sql_freeresult($result2); + } + $db->sql_freeresult($result); + } break; case 'oracle':