From 192e39a1fed4a6bc52c74b4a732c34740f189f12 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Tue, 11 Jan 2022 11:59:03 +0100 Subject: Check for required PHP extension on install --- install.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/install.php b/install.php index f7287e4..1dc1837 100755 --- a/install.php +++ b/install.php @@ -49,6 +49,26 @@ if (is_installed()) { $strRecommendation = '
  • Check your server documentation to activate at least PHP 7.2
  • '; } + $required_extensions = [ + 'dom', // moonmoon, simplepie + 'curl', // simplepie + 'iconv', // simplepie + 'libxml', // moonmoon, simplepie + 'mbstring', // simplepie + 'pcre', // moonmoon + 'xml', // moonmoon, simplepie + 'xmlreader', // moonmoon, simplepie + 'zlib' // simplepie + ]; + foreach ($required_extensions as $ext) { + if (extension_loaded($ext) === true) { + $strInstall .= installStatus("PHP extension $ext is present", 'OK', true); + } else { + $strInstall .= installStatus("PHP extension $ext is present", 'FAIL', false); + $strRecommendation .= "
  • Install PHP extension $ext on your server
  • "; + } + } + // Writable file requirements $tests = array( '/custom', -- cgit v1.2.1