summaryrefslogtreecommitdiffstats
path: root/usr/local/www/exec.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-02-27 16:47:35 -0500
committerjim-p <jimp@pfsense.org>2012-02-27 16:51:17 -0500
commitd54353aea7e956c6edae9cf4a91036f71079d924 (patch)
treebadab9594d78d0361181d18e379e111aca610865 /usr/local/www/exec.php
parentbf34d0de21e59aac87bfa9b1cfcc46eba4b67b41 (diff)
downloadpfsense-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-xusr/local/www/exec.php2
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>");
OpenPOWER on IntegriCloud