summaryrefslogtreecommitdiffstats
path: root/install.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-10-27 19:46:33 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-10-27 19:46:33 +0100
commit98534e4fa28b27727445f56414718de0a4d99968 (patch)
tree7216ac1562ba939f08d58ee400080d703008b184 /install.php
parentac081d2ca3b757003937012f84e1eee8568db55e (diff)
install.php: Check for PHP modules
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'install.php')
-rw-r--r--install.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/install.php b/install.php
index 0c4f427c1..df3868074 100644
--- a/install.php
+++ b/install.php
@@ -68,6 +68,23 @@ if ($buf != "0") {
$errors .= " - Error when testing qrencode: Return code was \"$buf\".\n";
}
+// test PHP modules
+$mod_groups = array(
+ "thumbnail generation" => array("gd"),
+ "database support" => array("mysql", "mysqli", "pgsql", "pdo_mysql", "pdo_pgsql"),
+);
+foreach ($mod_groups as $function => $mods) {
+ $found = 0;
+ foreach ($mods as $module) {
+ if (extension_loaded($module)) {
+ $found++;
+ }
+ }
+ if ($found == 0) {
+ $errors .= " - none of the modules needed for $function are loaded. Make sure to load at least one of these: ".implode(", ", $mods)."\n";
+ }
+}
+
if ($errors != "") {
echo nl2br("Errors occured:\n");