hlsiira / atheos-terminal Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Setup the Atheos in docker, installed Terminal Plugin and ran commands. All commands show response as "Array" and not the output of the command
Observed the following error in /var/log/apache2/error.log
Array to string conversion in /var/www/html/plugins/Terminal/terminal.php on line 147
Issue can be corrected by using implode so that Array is converted to string correctly.
diff --git a/terminal.php b/terminal.php
index f8b74d2..f12b28d 100644
--- a/terminal.php
+++ b/terminal.php
@@ -139,7 +139,7 @@ if (strtolower($command === "exit")) {
$command = explode(" && ", $command);
debug($command);
foreach ($command as $c) {
$output .= $Terminal->process($c);
$output .= implode("\n",$Terminal->process($c)); }
}
@@ -151,4 +151,4 @@ $output = array(
Common::send("success", $output);
The Terminal window is now frozen. You can close it and reopen it, but upon typing anything, it freezes again.
When it freezes, the following error is written to the PHP log:
PHP Fatal error: Uncaught Error: Call to undefined method Common::sendJSON() in <FOLDER>\plugins\Terminal\terminal.php:137
Stack trace:
#0 {main}
thrown in <FOLDER>\plugins\Terminal\terminal.php on line 137
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.