commit 27956b7478a921a42ccaa5e7326d8f09f12683f3
parent ea2c1625844efa560e3653732e9124144ea728ab
Author: markseu <mark2011@mayberg.se>
Date: Sat, 22 Feb 2020 18:20:15 +0100
Updated extensions, troubleshooting
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/system/extensions/core.php b/system/extensions/core.php
@@ -74,8 +74,6 @@ class YellowCore {
// Handle initialisation
public function load() {
- $troubleshooting = PHP_SAPI!="cli" ? "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>." : "";
- version_compare(PHP_VERSION, "5.6", ">=") || die("Datenstrom Yellow requires PHP 5.6 or higher! $troubleshooting\n");
if (defined("DEBUG") && DEBUG>=3) {
$serverVersion = $this->toolbox->getServerVersion();
echo "YellowCore::load Datenstrom Yellow ".YellowCore::VERSION.", PHP ".PHP_VERSION.", $serverVersion<br/>\n";
@@ -2198,6 +2196,7 @@ class YellowToolbox {
public function getServerVersion($shortFormat = false) {
$serverVersion = strtoupperu(PHP_SAPI)." ".PHP_OS;
if (preg_match("/^(\S+)/", $_SERVER["SERVER_SOFTWARE"], $matches)) $serverVersion = $matches[1]." ".PHP_OS;
+ if (preg_match("/^(\S+)\/(\S+)/", $_SERVER["SERVER_SOFTWARE"], $matches)) $serverVersion = $matches[1]." ".$matches[2]." ".PHP_OS;
if ($shortFormat && preg_match("/^(\pL+)/u", $serverVersion, $matches)) $serverVersion = $matches[1];
return $serverVersion;
}
diff --git a/system/extensions/install.php b/system/extensions/install.php
@@ -4,7 +4,7 @@
// This file may be used and distributed under the terms of the public license.
class YellowInstall {
- const VERSION = "0.8.18";
+ const VERSION = "0.8.19";
const TYPE = "feature";
const PRIORITY = "1";
public $yellow; //access to API
@@ -268,10 +268,12 @@ class YellowInstall {
// Check web server
public function checkServer() {
if ($this->yellow->isCommandLine()) {
+ version_compare(PHP_VERSION, "5.6", ">=") || die("Datenstrom Yellow requires PHP 5.6 or higher!\n");
$this->checkServerExtensions() || die("Datenstrom Yellow requires PHP ".$this->getServerExtensionRequired()." extension!\n");
} else {
$server = $this->yellow->toolbox->getServerVersion(true);
$troubleshooting = "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>.";
+ version_compare(PHP_VERSION, "5.6", ">=") || die("Datenstrom Yellow requires PHP 5.6 or higher! $troubleshooting\n");
$this->checkServerExtensions() || die("Datenstrom Yellow requires PHP ".$this->getServerExtensionRequired()." extension for $server! $troubleshooting\n");
$this->checkServerConfiguration() || die("Datenstrom Yellow requires a configuration file for $server! $troubleshooting\n");
$this->checkServerRewrite() || die("Datenstrom Yellow requires rewrite support for $server! $troubleshooting\n");