Updated installation, added links to troubleshooting

This commit is contained in:
markseu 2020-02-16 00:32:12 +01:00
parent d810f03580
commit 1a01fe8d7e
3 changed files with 9 additions and 6 deletions

View file

@ -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";

View file

@ -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());

View file

@ -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") {