commit 1a01fe8d7ebaa241395d2b26b97155ffee996240
parent d810f03580395bf0b590dea91c5a22b9cb57c143
Author: markseu <mark2011@mayberg.se>
Date: Sun, 16 Feb 2020 00:32:12 +0100
Updated installation, added links to troubleshooting
Diffstat:
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/system/extensions/core.php b/system/extensions/core.php
@@ -66,8 +66,6 @@ class YellowCore {
$this->system->setDefault("coreSystemFile", "system.ini");
$this->system->setDefault("coreTextFile", "text.ini");
$this->system->setDefault("coreLogFile", "yellow.log");
- $troubleshooting = "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>.";
- extension_loaded("mbstring") || die("Datenstrom Yellow requires PHP mbstring extension! $troubleshooting");
}
public function __destruct() {
@@ -76,6 +74,9 @@ class YellowCore {
// Handle initialisation
public function load() {
+ $troubleshooting = "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>.";
+ extension_loaded("mbstring") || die("Datenstrom Yellow requires PHP mbstring extension! $troubleshooting");
+ version_compare(PHP_VERSION, "5.6", ">=") || die("Datenstrom Yellow requires PHP 5.6 or higher! $troubleshooting");
if (defined("DEBUG") && DEBUG>=3) {
$serverVersion = $this->toolbox->getServerVersion();
echo "YellowCore::load Datenstrom Yellow ".YellowCore::VERSION.", PHP ".PHP_VERSION.", $serverVersion<br/>\n";
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.15";
+ const VERSION = "0.8.16";
const TYPE = "feature";
const PRIORITY = "1";
public $yellow; //access to API
@@ -12,6 +12,9 @@ class YellowInstall {
// Handle initialisation
public function onLoad($yellow) {
$this->yellow = $yellow;
+ $troubleshooting = "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>.";
+ extension_loaded("curl") || die("Datenstrom Yellow requires PHP cURL extension! $troubleshooting");
+ extension_loaded("zip") || die("Datenstrom Yellow requires PHP zip extension! $troubleshooting");
}
// Handle request
@@ -22,7 +25,7 @@ class YellowInstall {
$troubleshooting = "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>.";
$this->checkServerConfiguration($server) || die("Datenstrom Yellow requires $server configuration file! $troubleshooting");
$this->checkServerRewrite($scheme, $address, $base, $location, $fileName) || die("Datenstrom Yellow requires $server rewrite module! $troubleshooting");
- $this->checkServerAccess() || die("Datenstrom Yellow requires $server read/write access! $troubleshooting");
+ $this->checkServerAccess() || die("Datenstrom Yellow requires $server write access! $troubleshooting");
$statusCode = $this->processRequestInstall($scheme, $address, $base, $location, $fileName);
}
return $statusCode;
@@ -290,7 +293,7 @@ class YellowInstall {
return !empty($rawData) && $statusCode==200;
}
- // Check web server read/write access
+ // Check web server write access
public function checkServerAccess() {
$fileName = $this->yellow->system->get("coreSettingDir").$this->yellow->system->get("coreSystemFile");
return $this->yellow->system->save($fileName, array());
diff --git a/yellow.php b/yellow.php
@@ -3,7 +3,6 @@
// Copyright (c) 2013-2020 Datenstrom, https://datenstrom.se
// This file may be used and distributed under the terms of the public license.
-version_compare(PHP_VERSION, "5.6", ">=") || die("Datenstrom Yellow requires PHP 5.6 or higher!");
require_once("system/extensions/core.php");
if (PHP_SAPI!="cli") {