diff options
author | jim-p <jimp@pfsense.org> | 2012-02-27 16:47:35 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-02-27 16:51:17 -0500 |
commit | d54353aea7e956c6edae9cf4a91036f71079d924 (patch) | |
tree | badab9594d78d0361181d18e379e111aca610865 /usr/local/www/exec.php | |
parent | bf34d0de21e59aac87bfa9b1cfcc46eba4b67b41 (diff) | |
download | pfsense-d54353aea7e956c6edae9cf4a91036f71079d924.zip pfsense-d54353aea7e956c6edae9cf4a91036f71079d924.tar.gz |
Redirect stderr to stdout on exec.php so errors are visible.
Diffstat (limited to 'usr/local/www/exec.php')
-rwxr-xr-x | usr/local/www/exec.php | 2 |
1 files changed, 1 insertions, 1 deletions
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("</pre>"); |