aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-01-09 01:33:20 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-01-09 01:33:20 +0000
commit5cf6e00cf9e9aedfb293f1e9da228aefc37d70f8 (patch)
treeca2154e10cea3e9249ca477f3944a5eac2f95b8d /phpBB/install/install_install.php
parent27f915f305a2fc02ca33c34ceeb7c9ae3e119e99 (diff)
downloadforums-5cf6e00cf9e9aedfb293f1e9da228aefc37d70f8.tar
forums-5cf6e00cf9e9aedfb293f1e9da228aefc37d70f8.tar.gz
forums-5cf6e00cf9e9aedfb293f1e9da228aefc37d70f8.tar.bz2
forums-5cf6e00cf9e9aedfb293f1e9da228aefc37d70f8.tar.xz
forums-5cf6e00cf9e9aedfb293f1e9da228aefc37d70f8.zip
- installer now checks if the page size is correct for Firebird
- Firebird now has a proper explain page git-svn-id: file:///svn/phpbb/trunk@6863 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_install.php')
-rwxr-xr-xphpBB/install/install_install.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index c9231075df..38dc491665 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1967,6 +1967,14 @@ class install_install extends module
{
$error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
}
+ $db_info = @ibase_db_info($db->service_handle, $dbname, IBASE_STS_HDR_PAGES);
+
+ preg_match('/^\\s*Page size\\s*(\\d+)/m', $db_info, $regs);
+ $page_size = intval($regs[1]);
+ if ($page_size < 8192)
+ {
+ $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS'];
+ }
}
else
{
@@ -1994,6 +2002,39 @@ class install_install extends module
}
$db->sql_freeresult($result);
}
+
+ // Setup the stuff for our random table
+ $char_array = array_merge(range('A', 'Z'), range('0', '9'));
+ $char_len = mt_rand(7, 9);
+ $char_array_len = sizeof($char_array) - 1;
+
+ $final = '';
+
+ for ($i = 0; $i < $char_len; $i++)
+ {
+ $final .= $char_array[mt_rand(0, $char_array_len)];
+ }
+
+ // Create some random table
+ $sql = 'CREATE TABLE ' . $final . " (
+ FIELD1 VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ FIELD2 INTEGER DEFAULT 0 NOT NULL);";
+ $db->sql_query($sql);
+
+ // Create an index that should fail if the page size is less than 8192
+ $sql = 'CREATE INDEX ' . $final . ' ON ' . $final . '(FIELD1, FIELD2);';
+ $db->sql_query($sql);
+
+ if (ibase_errmsg() !== false)
+ {
+ $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS'];
+ }
+ else
+ {
+ // Kill the old table
+ $db->sql_query('DROP TABLE ' . $final . ';');
+ }
+ unset($final);
}
break;