From 8c79070cd94ac19a38ee198aea0b28ae279b0d92 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 10 Nov 2020 08:47:35 -0800 Subject: [PATCH] Added some extension checking for upgrade.php --- upgrade.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/upgrade.php b/upgrade.php index 94d80e5489..2999f4558e 100644 --- a/upgrade.php +++ b/upgrade.php @@ -48,6 +48,32 @@ if (version_compare(PHP_VERSION, $required_version, '<')) { echo "PHP version: " . PHP_VERSION . " is at least ".$required_version." - continuing... \n\n"; } +$ext_check = ''; +if ((!extension_loaded('gd')) || (!extension_loaded('imagick'))) { + $ext_check .= "PHP extension MISSING: gd or imagick \n"; +} + +if (!extension_loaded('php-ldap')) { + $ext_check .= "PHP extension MISSING: php-ldap \n"; +} + +if (!extension_loaded('php-json')) { + $ext_check .= "PHP extension MISSING: php-json \n"; +} + +if (!extension_loaded('php-fileinfo')) { + $ext_check .= "PHP extension MISSING: php-fileinfo \n"; +} + +if (!extension_loaded('php-openssl')) { + $ext_check .= "PHP extension MISSING: php-openssl \n"; +} + +if ($ext_check!='') { + echo "--------------------------------------------------------\n"; + echo $ext_check; + echo "--------------------------------------------------------\n"; +} echo "--------------------------------------------------------\n"; echo "STEP 2: Backing up database: \n";