From fb9c1f270d004582e4a393bfed97271fe214f779 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Fri, 5 Feb 2010 23:11:47 +0000 Subject: [PATCH] one less fork per graph on a page, yay git-svn-id: http://www.observium.org/svn/observer/trunk@768 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/graph.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/graph.php b/html/graph.php index 877ea1bd71..d342fb521d 100644 --- a/html/graph.php +++ b/html/graph.php @@ -61,7 +61,7 @@ if($_GET['debug']) { $thing = shell_exec($config['rrdtool'] . " graph $graphfile $rrd_options"); if(is_file($graphfile)) { header('Content-type: image/png'); - echo(`cat $graphfile`); + $fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd); } else { header('Content-type: image/png'); $string = "Graph Generation Error"; @@ -76,7 +76,7 @@ if($_GET['debug']) { if($graph) { header('Content-type: image/png'); - echo(`cat $graphfile`); + $fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd); } else { header('Content-type: image/png'); $string = "Graph Generation Error";