From d54353aea7e956c6edae9cf4a91036f71079d924 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 27 Feb 2012 16:47:35 -0500 Subject: Redirect stderr to stdout on exec.php so errors are visible. --- usr/local/www/exec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php index e9b0259..8dfd73d 100755 --- a/usr/local/www/exec.php +++ b/usr/local/www/exec.php @@ -230,7 +230,7 @@ if (!isBlank($_POST['txtCommand'])) { puts("\$ " . htmlspecialchars($_POST['txtCommand'])); putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " ")); /* PHP scripts */ - $ph = popen($_POST['txtCommand'], "r" ); + $ph = popen($_POST['txtCommand'] . ' 2>&1', "r" ); while ($line = fgets($ph)) echo htmlspecialchars($line); pclose($ph); puts(""); -- cgit v1.1