From 94d4de68ef29d2b172a18c89baba0f2114197c38 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Thu, 5 Mar 2020 03:26:21 +0100 Subject: [PATCH] if the output is not being redirected, read stderr as well --- strassenkind.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/strassenkind.php b/strassenkind.php index 626dec6..03d600b 100644 --- a/strassenkind.php +++ b/strassenkind.php @@ -46,6 +46,10 @@ echo "Done."; //run status command list otherwise foreach ($status_commands as $command) { if ($command != ""){ + // === is here on purpose. + if (strpos($command, '>') === false) { + $command = $command . " 2>&1"; + } $output = shell_exec($command); echo "
 $command 
\n
 $output 
\n
"; }