From ae74a678e9b6e8b906adbdf64cc98901c32006f7 Mon Sep 17 00:00:00 2001 From: shreesh arora Date: Tue, 12 Apr 2022 19:24:10 +0530 Subject: [PATCH] Added upper limit of PHP for QloApps installation --- classes/ConfigurationTest.php | 5 ++++- controllers/admin/AdminInformationController.php | 4 ++-- install/controllers/http/system.php | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/classes/ConfigurationTest.php b/classes/ConfigurationTest.php index 1723b902d..60628b646 100644 --- a/classes/ConfigurationTest.php +++ b/classes/ConfigurationTest.php @@ -145,7 +145,10 @@ class ConfigurationTestCore public static function test_phpversion() { - return version_compare(substr(phpversion(), 0, 5), '5.6.0', '>='); + return ( + version_compare(substr(phpversion(), 0, 5), '5.6.0', '>=') + && version_compare(substr(phpversion(), 0, 5), '8.0', '<') + ); } public static function test_new_phpversion() diff --git a/controllers/admin/AdminInformationController.php b/controllers/admin/AdminInformationController.php index 4fdf8ba14..86428f7e4 100644 --- a/controllers/admin/AdminInformationController.php +++ b/controllers/admin/AdminInformationController.php @@ -108,7 +108,7 @@ class AdminInformationControllerCore extends AdminController public function getTestResult() { $tests_errors = array( - 'phpversion' => $this->l('Update your PHP version.'), + 'phpversion' => $this->l('The required PHP version is between 5.6 to 7.4.'), 'upload' => $this->l('Configure your server to allow file uploads.'), 'system' => $this->l('Configure your server to allow the creation of directories and files with write permissions.'), 'gd' => $this->l('Enable the GD library on your server.'), @@ -128,7 +128,7 @@ class AdminInformationControllerCore extends AdminController 'register_globals' => $this->l('Set PHP "register_globals" option to "Off".'), 'gz' => $this->l('Enable GZIP compression on your server.'), 'files' => $this->l('Some QloApps files are missing from your server.'), - 'new_phpversion' => sprintf($this->l('You are using PHP %s version. Soon, the latest PHP version supported by QloApps will be PHP 5.4. To make sure you’re ready for the future, we recommend you to upgrade to PHP 5.4 now!'), phpversion()), + 'new_phpversion' => sprintf($this->l('You are using PHP %s version. Soon, the latest PHP version supported by QloApps will be PHP 5.6. To make sure you’re ready for the future, we recommend you to upgrade to PHP 5.6 now!'), phpversion()), 'pdo_mysql' => $this->l('PDO MySQL extension is not loaded'), 'openssl' => $this->l('PHP OpenSSL extension is not loaded'), ); diff --git a/install/controllers/http/system.php b/install/controllers/http/system.php index 86b374899..500b09bc2 100644 --- a/install/controllers/http/system.php +++ b/install/controllers/http/system.php @@ -87,7 +87,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp 'title' => $this->l('Required PHP parameters'), 'success' => 1, 'checks' => array( - 'phpversion' => $this->l('Minimum PHP 5.6.0 or later is required'), + 'phpversion' => $this->l('The required PHP version is between 5.6 to 7.4'), 'upload' => $this->l('Cannot upload files'), 'system' => $this->l('Cannot create new files and folders'), 'gd' => $this->l('GD library is not installed'),