summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-06-07 05:11:09 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-07 05:11:09 -0700
commit4a6775f5d34d1f26eac7e7c70e12c54cf2d330ec (patch)
treeda5285eb79ce80e2d134ec8f6a7f6cc9530656a5 /installer
parent097ef934c6fe188cc368905ee72b7cca6ad2f755 (diff)
parent1d91e1b2dc8456681f9e38baaca1d191cff1ac7a (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'installer')
-rw-r--r--installer/installer.php66
1 files changed, 35 insertions, 31 deletions
diff --git a/installer/installer.php b/installer/installer.php
index bd5fbff1..53a5e3db 100644
--- a/installer/installer.php
+++ b/installer/installer.php
@@ -187,45 +187,49 @@ class installer {
}
static function check_environment() {
- if (!function_exists("mysql_query") && !function_exists("mysqli_set_charset")) {
- $errors[] = "Gallery 3 requires a MySQL database, but PHP doesn't have either the <a href=\"http://php.net/mysql\">MySQL</a> or the <a href=\"http://php.net/mysqli\">MySQLi</a> extension.";
- }
+ if (!function_exists("mysql_query") && !function_exists("mysqli_set_charset")) {
+ $errors[] = "Gallery 3 requires a MySQL database, but PHP doesn't have either the <a href=\"http://php.net/mysql\">MySQL</a> or the <a href=\"http://php.net/mysqli\">MySQLi</a> extension.";
+ }
- if (!@preg_match("/^.$/u", utf8_encode("\xF1"))) {
- $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> support.";
- }
+ if (!@preg_match("/^.$/u", utf8_encode("\xF1"))) {
+ $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> support.";
+ }
- if (!(function_exists("spl_autoload_register"))) {
- $errors[] = "PHP is missing <a href=\"http://php.net/spl\">Standard PHP Library (SPL)</a> support";
- }
+ if (!(function_exists("spl_autoload_register"))) {
+ $errors[] = "PHP is missing <a href=\"http://php.net/spl\">Standard PHP Library (SPL)</a> support";
+ }
- if (!(class_exists("ReflectionClass"))) {
- $errors[] = "PHP is missing <a href=\"http://php.net/reflection\">reflection</a> support";
- }
+ if (!(class_exists("ReflectionClass"))) {
+ $errors[] = "PHP is missing <a href=\"http://php.net/reflection\">reflection</a> support";
+ }
- if (!(function_exists("filter_list"))) {
- $errors[] = "PHP is missing the <a href=\"http://php.net/filter\">filter extension</a>";
- }
+ if (!(function_exists("filter_list"))) {
+ $errors[] = "PHP is missing the <a href=\"http://php.net/filter\">filter extension</a>";
+ }
- if (!(extension_loaded("iconv"))) {
- $errors[] = "PHP is missing the <a href=\"http://php.net/iconv\">iconv extension</a>";
- }
+ if (!(extension_loaded("iconv"))) {
+ $errors[] = "PHP is missing the <a href=\"http://php.net/iconv\">iconv extension</a>";
+ }
- if (!(extension_loaded("simplexml"))) {
- $errors[] = "PHP is missing the <a href=\"http://php.net/simplexml\">SimpleXML extension</a>";
- }
+ if (!(extension_loaded("simplexml"))) {
+ $errors[] = "PHP is missing the <a href=\"http://php.net/simplexml\">SimpleXML extension</a>";
+ }
- if (!extension_loaded("mbstring")) {
- $errors[] = "PHP is missing the <a href=\"http://php.net/mbstring\">mbstring extension</a>";
- } else if (ini_get("mbstring.func_overload") & MB_OVERLOAD_STRING) {
- $errors[] = "The <a href=\"http://php.net/mbstring\">mbstring extension</a> is overloading PHP's native string functions. Please disable it.";
- }
+ if (!extension_loaded("mbstring")) {
+ $errors[] = "PHP is missing the <a href=\"http://php.net/mbstring\">mbstring extension</a>";
+ } else if (ini_get("mbstring.func_overload") & MB_OVERLOAD_STRING) {
+ $errors[] = "The <a href=\"http://php.net/mbstring\">mbstring extension</a> is overloading PHP's native string functions. Please disable it.";
+ }
- if (!function_exists("json_encode")) {
- $errors[] = "PHP is missing the <a href=\"http://php.net/manual/en/book.json.php\">JavaScript Object Notation (JSON) extension</a>. Please install it.";
- }
+ if (!function_exists("json_encode")) {
+ $errors[] = "PHP is missing the <a href=\"http://php.net/manual/en/book.json.php\">JavaScript Object Notation (JSON) extension</a>. Please install it.";
+ }
- return @$errors;
-}
+ if (!ini_get("short_open_tag")) {
+ $errors[] = "Gallery requires <a href=\"http://php.net/manual/en/ini.core.php\">short_open_tag</a> to be on. Please enable it in your php.ini.";
+ }
+
+ return @$errors;
+ }
}