diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-13 15:25:20 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-13 15:25:20 +0000 |
commit | b4baa6a0941aa32db06ddabc56612616fe75605f (patch) | |
tree | 962400d381463f414e006b221f8be1ada000da58 | |
parent | 4525d1cb733e893762e87a4f597f8489a9917191 (diff) | |
download | forums-b4baa6a0941aa32db06ddabc56612616fe75605f.tar forums-b4baa6a0941aa32db06ddabc56612616fe75605f.tar.gz forums-b4baa6a0941aa32db06ddabc56612616fe75605f.tar.bz2 forums-b4baa6a0941aa32db06ddabc56612616fe75605f.tar.xz forums-b4baa6a0941aa32db06ddabc56612616fe75605f.zip |
Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9970 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/docs/INSTALL.html | 2 | ||||
-rw-r--r-- | phpBB/includes/db/firebird.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions_install.php | 12 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 27 | ||||
-rw-r--r-- | phpBB/language/en/install.php | 7 |
6 files changed, 42 insertions, 11 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 20f3f849d5..f38bb3e4ff 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -219,6 +219,7 @@ <li>[Change] When creating a new forum without copying permissions, ask again.</li> <li>[Change] Parse multiline url title for [url] BBCode tag. (Bug #1309)</li> <li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li> + <li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li> <li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li> <li>[Feature] Backported 3.2 captcha plugins. <ul> diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 577bc99c6e..56f68b1dcb 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -139,7 +139,7 @@ <li>MySQL 3.23 or above (MySQLi supported)</li> <li>PostgreSQL 7.3+</li> <li>SQLite 2.8.2+</li> - <li>Firebird 2.0+</li> + <li>Firebird 2.1+</li> <li>MS SQL Server 2000 or above (directly or via ODBC)</li> <li>Oracle</li> </ul> diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index f5e8595382..fb1ef44c55 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -20,7 +20,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); /** * Firebird/Interbase Database Abstraction Layer -* Minimum Requirement is Firebird 2.0 +* Minimum Requirement is Firebird 2.1 * @package dbal */ class dbal_firebird extends dbal @@ -72,7 +72,7 @@ class dbal_firebird extends dbal return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION); } - return ($raw) ? '2.0' : 'Firebird/Interbase'; + return ($raw) ? '2.1' : 'Firebird/Interbase'; } /** diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index 7fa299548d..a5889224a1 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -181,7 +181,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 function dbms_select($default = '', $only_20x_options = false) { global $lang; - + $available_dbms = get_available_dbms(false, false, $only_20x_options); $dbms_options = ''; foreach ($available_dbms as $dbms_name => $details) @@ -402,10 +402,10 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, } else { - $sql = "SELECT FIRST 0 char_length('') - FROM RDB\$DATABASE"; + $sql = 'SELECT 1 FROM RDB$DATABASE + WHERE BIN_AND(10, 1) = 0'; $result = $db->sql_query($sql); - if (!$result) // This can only fail if char_length is not defined + if (!$result) // This can only fail if BIN_AND is not defined { $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; } @@ -446,7 +446,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, unset($final); } break; - + case 'oracle': if ($unicode_check) { @@ -468,7 +468,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, } } break; - + case 'postgres': if ($unicode_check) { diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 76de50186d..dc3fcfe956 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -222,6 +222,33 @@ if (empty($config['dbms_version'])) set_config('dbms_version', $db->sql_server_info(true)); } +// Firebird update from Firebord 2.0 to 2.1+ required? +if ($db->sql_layer == 'firebird') +{ + // We do not trust any PHP5 function enabled, we will simply test for a function new in 2.1 + $db->sql_return_on_error(true); + + $sql = 'SELECT 1 FROM RDB$DATABASE + WHERE BIN_AND(10, 1) = 0'; + $result = $db->sql_query($sql); + + if (!$result || $db->sql_error_triggered) + { + echo '<br /><br />'; + echo '<h1>' . $lang['ERROR'] . '</h1><br />'; + + echo '<p>' . $lang['FIREBIRD_DBMS_UPDATE_REQUIRED'] . '</p>'; + + _print_footer(); + + exit_handler(); + exit; + } + + $db->sql_freeresult($result); + $db->sql_return_on_error(false); +} + // MySQL update from MySQL 3.x/4.x to > 4.1.x required? if ($db->sql_layer == 'mysql' || $db->sql_layer == 'mysql4' || $db->sql_layer == 'mysqli') { diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index cbbd850c8a..a80f457c17 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -167,6 +167,9 @@ $lang = array_merge($lang, array( 'FILES_REQUIRED_EXPLAIN' => '<strong>Required</strong> - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see “Not Found” you need to create the relevant file or directory. If you see “Unwritable” you need to change the permissions on the file or directory to allow phpBB to write to it.', 'FILLING_TABLE' => 'Filling table <strong>%s</strong>', 'FILLING_TABLES' => 'Filling tables', + + 'FIREBIRD_DBMS_UPDATE_REQUIRED' => 'phpBB no longer supports Firebird/Interbase prior to Version 2.1. Please update your Firebird installation to at least 2.1.0 before proceeding with the update.', + 'FINAL_STEP' => 'Process final step', 'FORUM_ADDRESS' => 'Board address', 'FORUM_ADDRESS_EXPLAIN' => 'This is the URL of your former board, for example <samp>http://www.example.com/phpBB2/</samp>. If an address is entered here and not left empty every instance of this address will be replaced by your new board address within messages, private messages and signatures.', @@ -209,7 +212,7 @@ $lang = array_merge($lang, array( <li>MySQL 3.23 or above (MySQLi supported)</li> <li>PostgreSQL 7.3+</li> <li>SQLite 2.8.2+</li> - <li>Firebird 2.0+</li> + <li>Firebird 2.1+</li> <li>MS SQL Server 2000 or above (directly or via ODBC)</li> <li>Oracle</li> </ul> @@ -231,7 +234,7 @@ $lang = array_merge($lang, array( 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL with MySQLi Extension” option you have selected. Please try the “MySQL” option instead.', 'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.', 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.', - 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.0, please upgrade to a newer version.', + 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.1, please upgrade to a newer version.', 'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.', 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.', 'INST_ERR_DB_NO_NAME' => 'No database name specified.', |