PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : vnstat php frontend



boom123
19.08.10, 15:04
hey leute,

hab da ein problem mit dem php frontend für vnstat.
vnstat per apt-get install installiert, anschließend vnstat ausgeführt. das hat auch gefunzt bzw. gibt die traffic-werkte aus.
php frontend hab ich direkt von der anbieterseite per wget in den www ordner gezogen, entpackt und die config.php angepasst. leider bekomm ich beim aufruf eine weisse seite - ohne irgendwas drin (auch quelltext ist leer).
ich denke mal, das ich in der config.php alles richtig angepasst hab, ich post die einfach mal:


<?php
//
// vnStat PHP frontend (c)2006-2010 Bjorge Dijkstra (bjd@jooz.net)
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//
// see file COPYING or at http://www.gnu.org/licenses/gpl.html
// for more information.
//
error_reporting(E_ALL | E_NOTICE);

//
// configuration parameters
//
// edit these to reflect your particular situation
//
$locale = 'de_DE.UTF-8';
$language = 'de';

// list of network interfaces monitored by vnStat
$iface_list = array('eth1');

//
// optional names for interfaces
// if there's no name set for an interface then the interface identifier
// will be displayed instead
//
$iface_title['eth1'] = 'eth1';
// $iface_title['sixxs'] = 'SixXS IPv6';

//
// There are two possible sources for vnstat data. If the $vnstat_bin
// variable is set then vnstat is called directly from the PHP script
// to get the interface data.
//
// The other option is to periodically dump the vnstat interface data to
// a file (e.g. by a cronjob). In that case the $vnstat_bin variable
// must be cleared and set $data_dir to the location where the dumps
// are stored. Dumps must be named 'vnstat_dump_$iface'.
//
// You can generate vnstat dumps with the command:
// vnstat --dumpdb -i $iface > /path/to/data_dir/vnstat_dump_$iface
//
$vnstat_bin = '/usr/bin/vnstat';
$data_dir = '';

// graphics format to use: svg or png
$graph_format='png';

// Font to use for PNG graphs
define('GRAPH_FONT',dirname(__FILE__).'/VeraBd.ttf');

// Font to use for SVG graphs
define('SVG_FONT', 'Verdana');

// Default theme
define('DEFAULT_COLORSCHEME', 'light');

?>


sprachpacket ist eigentlich nicht standardmässig enthalten, wird aber auf der dload seite angeboten. ich hab schon versucht die sprache auf englisch umzustellen (vlt. wegen bugs in der sprachdatei). aber leider selbes problem mit der weissen seite.
der pfad zu vnstat stimmt auch (/usr/bin/vnstat). ich hab zwar noch einen pfad wo vnstat die traffic schreibt (/var/lib/vnstat), dort gibts ne datei eth1 und .eth1. in beiden steh nen langer code drin. nachdem aber das php frontend die traffic direkt über vnstat ausliest, werden diese beiden files net benötigt.
hat von euch schon jemand erfahrungen mit dem vnstat php frontend sammeln können? und könnte mir somit mit meinem problem weiterhelfen?
vielen dank schonmal!

lg

drcux
19.08.10, 21:18
logfiles?
.............

boom123
20.08.10, 15:31
logfiles von was?
webserver?

tomes
21.08.10, 00:21
Hi,

die benötigten Pakete GD und Co. sind installiert ja ?
Was passiert den wenn du in den selben Verzeichniss eine test.php mit einen echo "Hello World" reinlegst und aufrufst?

Bei mir funktioniert das ganz super, leider bin ich im Moment nicht zu Haus.

mfg
tomes