From ec8200d0eb7ee2fc5d198eb9685d800f9a4bb7a4 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 11 Apr 2014 11:02:12 -0700 Subject: [PATCH] Web: in PHP < 5.3.0, mysqli doesn't support persistent connections --- html/inc/db_conn.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html/inc/db_conn.inc b/html/inc/db_conn.inc index a3a035cb78..7f32489e99 100644 --- a/html/inc/db_conn.inc +++ b/html/inc/db_conn.inc @@ -35,7 +35,11 @@ class DbConn { function init_conn($user, $passwd, $host, $name) { if (MYSQLI) { - $this->db_conn = new mysqli("p:".$host, $user, $passwd); + if (version_compare(PHP_VERSION, '5.3.0') < 0) { + $this->db_conn = new mysqli($host, $user, $passwd); + } else { + $this->db_conn = new mysqli("p:".$host, $user, $passwd); + } } else { $this->db_conn = mysql_pconnect($host, $user, $passwd); }