diff --git a/.devilbox/www/include/lib/container/Mysql.php b/.devilbox/www/include/lib/container/Mysql.php index 6f562709..677485df 100644 --- a/.devilbox/www/include/lib/container/Mysql.php +++ b/.devilbox/www/include/lib/container/Mysql.php @@ -37,7 +37,7 @@ class Mysql extends BaseClass implements BaseInterface // Silence errors and try to connect error_reporting(0); - $link = mysqli_connect($hostname, $user, $pass); + $link = @mysqli_connect($hostname, $user, $pass); error_reporting(-1); if (mysqli_connect_errno()) { diff --git a/.devilbox/www/include/lib/container/Pgsql.php b/.devilbox/www/include/lib/container/Pgsql.php index 3f637b0a..14832ed3 100644 --- a/.devilbox/www/include/lib/container/Pgsql.php +++ b/.devilbox/www/include/lib/container/Pgsql.php @@ -45,9 +45,9 @@ class Pgsql extends BaseClass implements BaseInterface // Silence errors and try to connect error_reporting(0); if ($db !== null) { - $link = pg_connect('host='.$hostname.' dbname='.$db.' user='.$user.' password='.$pass); + $link = @pg_connect('host='.$hostname.' dbname='.$db.' user='.$user.' password='.$pass); } else { - $link = pg_connect('host='.$hostname.' user='.$user.' password='.$pass); + $link = @pg_connect('host='.$hostname.' user='.$user.' password='.$pass); } error_reporting(-1); diff --git a/.devilbox/www/include/lib/container/Redis.php b/.devilbox/www/include/lib/container/Redis.php index 9663c6d3..6d2334f9 100644 --- a/.devilbox/www/include/lib/container/Redis.php +++ b/.devilbox/www/include/lib/container/Redis.php @@ -37,19 +37,17 @@ class Redis extends BaseClass implements BaseInterface { parent::__construct($hostname, $data); - // Silence errors and try to connect - error_reporting(0); - $redis = new \Redis(); - - if (!$redis->connect($hostname, 6379)) { - $this->setConnectError('Failed to connect to Redis host on '.$hostname); - $this->setConnectErrno(1); - //loadClass('Logger')->error($this->_connect_error); - } else { - $redis->set('devilbox-version', $GLOBALS['DEVILBOX_VERSION'].' ('.$GLOBALS['DEVILBOX_DATE'].')'); - $this->_redis = $redis; + if ($this->isAvailable()) { + $redis = new \Redis(); + if (!@$redis->connect($hostname, 6379, 0.5, NULL)) { + $this->setConnectError('Failed to connect to Redis host on '.$hostname); + $this->setConnectErrno(1); + //loadClass('Logger')->error($this->_connect_error); + } else { + $redis->set('devilbox-version', $GLOBALS['DEVILBOX_VERSION'].' ('.$GLOBALS['DEVILBOX_DATE'].')'); + $this->_redis = $redis; + } } - error_reporting(-1); } /**