mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
first PDO commit. make connection in static-config, use in /devices/
git-svn-id: http://www.observium.org/svn/observer/trunk@2272 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -939,6 +939,13 @@ if (!$observium_link)
|
||||
}
|
||||
$observium_db = mysql_select_db($config['db_name'], $observium_link);
|
||||
|
||||
try {
|
||||
$db = new PDO('mysql:host='.$config['db_host'].';dbname='.$config['db_name'], $config['db_user'], $config['db_pass']);
|
||||
} catch (PDOException $e) {
|
||||
print "Error!: " . $e->getMessage() . "<br/>";
|
||||
die();
|
||||
}
|
||||
|
||||
# Set some times needed by loads of scripts (it's dynamic, so we do it here!)
|
||||
|
||||
$now = time();
|
||||
|
||||
Reference in New Issue
Block a user