web: suppress mysql connect warnings

This commit is contained in:
David Anderson 2015-08-06 10:46:59 -07:00
parent eed9bdd373
commit 15ac87749c
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ if (MYSQLI) {
}
} else {
function _mysql_connect($host, $user, $pass, $db_name) {
$link = mysql_pconnect($host, $user, $pass);
$link = @mysql_pconnect($host, $user, $pass);
if (!$link) return null;
if (!mysql_select_db($db_name, $link)) {
return null;

View File

@ -36,9 +36,9 @@ class DbConn {
}
//if (version_compare(PHP_VERSION, '5.3.0') < 0) {
if (1) { // don't use persistent connections for now
$this->db_conn = new mysqli($host, $user, $passwd, $name, $port);
$this->db_conn = @new mysqli($host, $user, $passwd, $name, $port);
} else {
$this->db_conn = new mysqli("p:".$host, $user, $passwd, $name, $port);
$this->db_conn = @new mysqli("p:".$host, $user, $passwd, $name, $port);
}
global $mysqli;
$mysqli = $this->db_conn;