diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index adf38e4d86..c91bd63e0e 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1671,6 +1671,26 @@ class install_install extends module } $db->sql_freeresult($result); + // Make sure that the user has selected a sensible DBAL for the DBMS actually installed + switch ($dbms) + { + case 'mysql4': + if (version_compare(mysql_get_server_info(), '4.0.0', '<')) + { + $error[] = $lang['INST_ERR_DB_NO_MYSQL4']; + } + + break; + + case 'mysqli': + if (version_compare(mysqli_get_server_info(), '4.1.3', '<')) + { + $error[] = $lang['INST_ERR_DB_NO_MYSQLI']; + } + + break; + } + $db->sql_close(); } diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 2844e7be79..4f168637df 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -149,6 +149,8 @@ $lang = array_merge($lang, array( 'INSTALL_TEST' => 'Test Again', 'INST_ERR_DB_CONNECT' => 'Could not connect to the database, see error message below', 'INST_ERR_DB_NO_ERROR' => 'No error message given', + 'INST_ERR_DB_NO_MYSQL4' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.x/5.x" option you have selected. Please try the "MySQL 3.23.x/4.x" option instead.', + 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.1.x/5.x with MySQLi Extension" option you have selected. Please try the "MySQL 4.x/5.x" or "MySQL 3.23.x/4.x" option instead.', 'INST_ERR_DB_NO_NAME' => 'No database name specified', 'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid', 'INST_ERR_EMAIL_MISMATCH' => 'The emails you entered did not match.',