--- etc/95.php.orig 2014-06-22 15:27:55.587467922 +0100 +++ etc/95.php 2014-06-22 15:28:47.947474934 +0100 @@ -4,10 +4,8 @@ print "\n\n
\n"; /* Connect to RTG MySQL Database */ - $dbc=@mysql_connect ($host, $user, $pass) or - $dbc=@mysql_connect ("$host:/var/lib/mysql/mysql.sock", $user, $pass) or + $dbc=@mysqli_connect ($host, $user, $pass, $db) or die ("MySQL Connection Failed, Check Configuration."); - mysql_select_db($db,$dbc); if ($PHP_SELF == "") { $PHP_SELF = "95.php"; @@ -50,8 +48,8 @@ $max = $avg = $nintyfifth = 0; $rate = array(); - $selectResult=mysql_query($statement, $dbc); - while ($selectRow=mysql_fetch_object($selectResult)){ + $selectResult=mysqli_query($dbc, $statement); + while ($selectRow=mysqli_fetch_object($selectResult)){ $counter = $selectRow->counter; $sample_secs = $selectRow->unixtime; $total += $counter; @@ -89,9 +87,8 @@ \n"; if (($bt || $smonth)) { - $dbc=@mysql_connect ($host, $user, $pass) or - $dbc=@mysql_connect ("$host:/var/lib/mysql/mysql.sock", $user, $pass) or die ("MySQL Connection Failed, Check Configuration."); - mysql_select_db($db,$dbc); + $dbc=@mysqli_connect ($host, $user, $pass, $db) or + die ("MySQL Connection Failed, Check Configuration."); /* Format into GNU date syntax */ if ($bt == "") { $bt = strtotime("$syear-$smonth-$sday $shour:$smin:00"); @@ -104,11 +101,11 @@ $range="dtime>FROM_UNIXTIME($bt) AND dtime<=FROM_UNIXTIME($et)"; $selectQuery="SELECT id, name, description, rid FROM interface WHERE description LIKE \"%$customer%\""; - $selectResult=mysql_query($selectQuery, $dbc); - if (mysql_num_rows($selectResult) <= 0) + $selectResult=mysqli_query($dbc, $selectQuery); + if (mysqli_num_rows($selectResult) <= 0) print "";
}
- if ($dbc) mysql_close($dbc);
+ if ($dbc) mysqli_close($dbc);
echo "\n";
?>