From c33ac93b2b4c82c502898eb5f8afe3197c456af6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 22 Jan 2009 19:51:52 +0000 Subject: Require mysqli_set_charset to use the mysqli extension --- installer/web.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'installer/web.php') diff --git a/installer/web.php b/installer/web.php index 33012a79..89b0021d 100644 --- a/installer/web.php +++ b/installer/web.php @@ -37,7 +37,7 @@ if (installer::already_installed()) { "password" => $_POST["dbpass"], "dbname" => $_POST["dbname"], "prefix" => "", - "type" => function_exists("mysqli_init") ? "mysqli" : "mysql"); + "type" => function_exists("mysqli_set_charset") ? "mysqli" : "mysql"); if (!installer::connect($config)) { $content = render("invalid_db_info.html.php"); @@ -73,11 +73,7 @@ function oops($error) { } function check_environment() { - if (version_compare(PHP_VERSION, "5.2.3", "<")) { - $errors[] = "Gallery 3 requires PHP 5.2.3 or newer, current version: " . PHP_VERSION; - } - - if (!function_exists("mysql_query") && !function_exists("mysqli_init")) { + if (!function_exists("mysql_query") && !function_exists("mysqli_set_charset")) { $errors[] = "Gallery 3 requires a MySQL database, but PHP doesn't have either the the MySQL or the MySQLi extension."; } -- cgit v1.2.3