aboutsummaryrefslogtreecommitdiffstats
path: root/config/quagga_ospfd/status_ospfd.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-11-26 23:56:43 +0100
committerErmal <eri@pfsense.org>2012-11-26 23:56:43 +0100
commit762e1f4919c433e0b14f2a653ebfdb96d4ad960e (patch)
tree49a9d000f931d932c85c981cfac7aa2fa84f5b87 /config/quagga_ospfd/status_ospfd.php
parent1acb1a5dc236393b924f989b64e1e73aefb3cb45 (diff)
downloadpfsense-packages-762e1f4919c433e0b14f2a653ebfdb96d4ad960e.tar.gz
pfsense-packages-762e1f4919c433e0b14f2a653ebfdb96d4ad960e.tar.bz2
pfsense-packages-762e1f4919c433e0b14f2a653ebfdb96d4ad960e.zip
Use popen here to not reach php memory limits
Diffstat (limited to 'config/quagga_ospfd/status_ospfd.php')
-rw-r--r--config/quagga_ospfd/status_ospfd.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/config/quagga_ospfd/status_ospfd.php b/config/quagga_ospfd/status_ospfd.php
index 438347ff..0012af0f 100644
--- a/config/quagga_ospfd/status_ospfd.php
+++ b/config/quagga_ospfd/status_ospfd.php
@@ -68,12 +68,9 @@ function doCmdT($title, $command) {
$execOutput = "";
$execStatus = "";
- exec ($command . " 2>&1", $execOutput, $execStatus);
- for ($i = 0; isset($execOutput[$i]); $i++) {
- if ($i > 0) {
- echo "\n";
- }
- echo htmlspecialchars($execOutput[$i],ENT_NOQUOTES);
+ $fd = popen("{$command} 2>&1", "r");
+ while (($line = fgets($fd)) !== FALSE) {
+ echo htmlspecialchars($line, ENT_NOQUOTES);
}
echo "</pre></tr>\n";
echo "</table>\n";