From 2566ae9fd4ae5fd3dbbfcfba0b6fda8747c36801 Mon Sep 17 00:00:00 2001 From: Thomas Nilsen Date: Thu, 8 Nov 2018 14:04:44 +0100 Subject: [PATCH] Add prerequisite checks to install script. - Pryx/server-status#31 --- install.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/install.php b/install.php index 426db4e..ccd06d8 100644 --- a/install.php +++ b/install.php @@ -2,6 +2,7 @@ require_once("template.php"); define("WEB_URL", "."); //Website name define("NAME", _('Status page')); //Website name +define("MINIMUM_PHP_VERSION", "5.4.0"); require_once("classes/locale-negotiator.php"); $negotiator = new LocaleNegotiator("en_GB"); @@ -138,6 +139,47 @@ if(isset($_POST['server']) && empty($message)) } Template::render_header(_("Install")); ?> +

+ + MINIMUM_PHP_VERSION + if (strnatcmp(phpversion(), MINIMUM_PHP_VERSION) >= 0) { $preq_phpver = $preq_ok; } + + // Check if we have mysqlnd installed + if ( function_exists('mysqli_get_client_stats') ) { $preq_mysqlnd = $preq_ok; } + + // Check if we have access to write to location + if ( is_writable(__DIR__) ) { $preq_writedir = $preq_ok; } + +?> +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+