diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-19 20:20:10 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-19 20:20:10 +0000 |
commit | d51955c8efa78d7f0a0ca8c138c2eebaf5ecb975 (patch) | |
tree | 7dcf92fc6e7d2fa0ce4b5182a9477e13ed6441ed /installer/installer.php | |
parent | f5997a02e0b78b56b8c27ccb48092e4cdd9430d7 (diff) |
Pull the environment check out into a separate web page to simplify
the CLI installer. Put a link to it in the footer of every web
install page. Don't allow users to run it if Gallery 3 is already
installed.
Diffstat (limited to 'installer/installer.php')
-rw-r--r-- | installer/installer.php | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/installer/installer.php b/installer/installer.php index 72225ef0..2da3cd02 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -31,7 +31,6 @@ class installer { $config = self::parse_cli_params(); try { - self::environment_check(); self::setup_database($config); self::setup_var(); self::install($config); @@ -83,54 +82,6 @@ class installer { return file_exists(VARPATH . "database.php"); } - static function environment_check() { - $errors = array(); - - if (version_compare(PHP_VERSION, "5.2", "<")) { - $errors["PHP Version"] = sprintf( - "Gallery3 requires PHP 5.2 or newer, current version: %s.", PHP_VERSION); - } - - if (!@preg_match("/^.$/u", utf8_encode("\xF1"))) { - $errors["PCRE UTF-8"] = - "PHP is missing Perl-Compatible Regular Expression support (http://php.net/pcre)"; - } - - if (!(class_exists("ReflectionClass"))) { - $errors["PHP Reflection"] = "PHP is missing Reflection support (http://php.net/reflection)"; - } - - if (!(function_exists("filter_list"))) { - $errors["Filters"] = "PHP is missing the filter extension (http://php.net/filter)"; - } - - if (!(extension_loaded("iconv"))) { - $errors["iconv"] = "PHP is missing the iconv extension (http://php.net/iconv)"; - } - - if (extension_loaded("mbstring") && - (ini_get("mbstring.func_overload") & MB_OVERLOAD_STRING)) { - $errors["Multibyte Strings"] = - "The mbstring extension is overloading PHP's native string functions " . - "(http://php.net/mbstring)"; - } - - if (!(isset($_SERVER["REQUEST_URI"]) || isset($_SERVER["PHP_SELF"]))) { - $errors["URL Detection"] = - "Neither \$_SERVER['REQUEST_URI'] or \$_SERVER['PHP_SELF'] is available"; - } - - $short_tags = ini_get("short_open_tag"); - if (empty($short_tags)) { - $errors["Short Tags"] = - "PHP short tag support is disabled. (http://php.net/manual/en/ini.core.php)"; - } - - if ($errors) { - throw new InstallException($errors); - } - } - static function parse_cli_params() { $config = array("host" => "localhost", "user" => "root", |