summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rdalverny@gmail.com>2022-01-11 11:59:03 +0100
committerRomain d'Alverny <rdalverny@gmail.com>2022-01-11 11:59:03 +0100
commit192e39a1fed4a6bc52c74b4a732c34740f189f12 (patch)
tree40fff0e751c6154ceb2ebc19514c34d3901f212e
parent45fc21386a05eef391ce1469e5a40b521fe94e7f (diff)
downloadplanet-192e39a1fed4a6bc52c74b4a732c34740f189f12.tar
planet-192e39a1fed4a6bc52c74b4a732c34740f189f12.tar.gz
planet-192e39a1fed4a6bc52c74b4a732c34740f189f12.tar.bz2
planet-192e39a1fed4a6bc52c74b4a732c34740f189f12.tar.xz
planet-192e39a1fed4a6bc52c74b4a732c34740f189f12.zip
Check for required PHP extension on install
-rwxr-xr-xinstall.php20
1 files changed, 20 insertions, 0 deletions
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 = '<li>Check your server documentation to activate at least PHP 7.2</li>';
}
+ $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 <code>$ext</code> is present", 'OK', true);
+ } else {
+ $strInstall .= installStatus("PHP extension <code>$ext</code> is present", 'FAIL', false);
+ $strRecommendation .= "<li>Install PHP extension <code>$ext</code> on your server</li>";
+ }
+ }
+
// Writable file requirements
$tests = array(
'/custom',