commit 98b7e3b68f1ab8a407cbc9192bd92c550bd7dd62
parent dfb6cefb0588a2fb6ef27e144777df820a1ae2b2
Author: markseu <mark2011@mayberg.se>
Date: Wed, 16 Mar 2022 16:24:11 +0100
Better troubleshooting for command line
Diffstat:
4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/system/extensions/core.php b/system/extensions/core.php
@@ -75,7 +75,8 @@ class YellowCore {
// Check requirements
public function checkRequirements() {
- $troubleshooting = PHP_SAPI!="cli" ? "<a href=\"".$this->getTroubleshootingUrl()."\">See troubleshooting</a>." : "";
+ $troubleshooting = PHP_SAPI!="cli" ?
+ "<a href=\"".$this->getTroubleshootingUrl()."\">See troubleshooting</a>." : "See ".$this->getTroubleshootingUrl();
version_compare(PHP_VERSION, "5.6", ">=") || die("Datenstrom Yellow requires PHP 5.6 or higher! $troubleshooting\n");
extension_loaded("curl") || die("Datenstrom Yellow requires PHP curl extension! $troubleshooting\n");
extension_loaded("gd") || die("Datenstrom Yellow requires PHP gd extension! $troubleshooting\n");
@@ -176,8 +177,9 @@ class YellowCore {
$fileName = substru($fileNameAbsolute, strlenu($this->system->get("coreServerInstallDirectory")));
$this->log("error", "Can't parse file '$fileName'!");
@header($this->toolbox->getHttpStatusFormatted(500));
- $troubleshooting = PHP_SAPI!="cli" ? "<a href=\"".$this->getTroubleshootingUrl()."\">See troubleshooting</a>." : "";
- echo "<br/>\nCheck the log file. Please activate the debug mode for more information. $troubleshooting\n";
+ $troubleshooting = PHP_SAPI!="cli" ?
+ "<a href=\"".$this->getTroubleshootingUrl()."\">See troubleshooting</a>." : "See ".$this->getTroubleshootingUrl();
+ echo "<br/>\nCheck the log file. Activate the debug mode for more information. $troubleshooting\n";
}
}
diff --git a/system/extensions/install.php b/system/extensions/install.php
@@ -2,7 +2,7 @@
// Install extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/install
class YellowInstall {
- const VERSION = "0.8.62";
+ const VERSION = "0.8.63";
const PRIORITY = "1";
public $yellow; // access to API
@@ -348,8 +348,9 @@ class YellowInstall {
list($name, $version, $os) = $this->yellow->toolbox->detectServerInformation();
echo "YellowInstall::checkCommandRequirements for $name $version, $os<br/>\n";
}
- $this->checkServerComplete() || die("Datenstrom Yellow requires complete upload!\n");
- $this->checkServerWrite() || die("Datenstrom Yellow requires write access!\n");
+ $troubleshooting = "See ".$this->yellow->getTroubleshootingUrl();
+ $this->checkServerComplete() || die("Datenstrom Yellow requires complete upload! $troubleshooting\n");
+ $this->checkServerWrite() || die("Datenstrom Yellow requires write access! $troubleshooting\n");
}
// Detect browser languages
diff --git a/system/extensions/serve.php b/system/extensions/serve.php
@@ -2,7 +2,7 @@
// Serve extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/serve
class YellowServe {
- const VERSION = "0.8.16";
+ const VERSION = "0.8.17";
public $yellow; // access to API
// Handle initialisation
@@ -32,7 +32,7 @@ class YellowServe {
if ($scheme=="http" && !empty($address)) {
if ($this->checkDynamicSettings($path, $url)) {
if (!preg_match("/\:\d+$/", $address)) $address .= ":8000";
- echo "Starting built-in web server on $scheme://$address/\n";
+ echo "Starting built-in web server. Open a web browser and go to $scheme://$address/\n";
echo "Press Ctrl+C to quit...\n";
if ($this->isDynamicPath($path)) {
exec("php -S $address yellow.php 2>&1", $outputLines, $returnStatus);
diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini
@@ -64,11 +64,11 @@ media/images/photo.jpg: photo.jpg, create, optional
media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional
Extension: Install
-Version: 0.8.62
+Version: 0.8.63
Description: Install a brand new, shiny website.
HelpUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/install
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/install.zip
-Published: 2022-03-11 01:33:02
+Published: 2022-03-16 15:02:38
Developer: Datenstrom
Status: unlisted
system/extensions/install.php: install.php, create
@@ -106,11 +106,11 @@ Tag: feature
system/extensions/meta.php: meta.php, create, update
Extension: Serve
-Version: 0.8.16
+Version: 0.8.17
Description: Built-in web server.
HelpUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/serve
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/serve.zip
-Published: 2021-08-23 12:46:25
+Published: 2022-03-16 16:15:47
Developer: Datenstrom
Tag: feature
system/extensions/serve.php: serve.php, create, update