mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
properly warn about missing memcached class
git-svn-id: http://www.observium.org/svn/observer/trunk@3061 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1134,11 +1134,19 @@ if (!$observium_link)
|
||||
}
|
||||
$observium_db = mysql_select_db($config['db_name'], $observium_link);
|
||||
|
||||
if($config['memcached']['enable'])
|
||||
if ($config['memcached']['enable'])
|
||||
{
|
||||
$memcache = new Memcached();
|
||||
$memcache->addServer($config['memcached']['host'], $config['memcached']['port']);
|
||||
if ($debug) { print_r($memcache->getStats()); }
|
||||
if (class_exists("Memcached"))
|
||||
{
|
||||
$memcache = new Memcached();
|
||||
$memcache->addServer($config['memcached']['host'], $config['memcached']['port']);
|
||||
if ($debug) { print_r($memcache->getStats()); }
|
||||
}
|
||||
else
|
||||
{
|
||||
echo("WARNING: You have enabled memcached but have not installed the PHP bindings. Disabling memcached support.\n");
|
||||
$config['memcached']['enable'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
# Set some times needed by loads of scripts (it's dynamic, so we do it here!)
|
||||
|
||||
Reference in New Issue
Block a user