From 05112a541ccdf17c5e335fd8d26eb384c621f6f0 Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Thu, 29 Mar 2012 20:19:22 +0200 Subject: [PATCH] mysqli persistent connections only for PHP 5.3+ --- libraries/dbi/mysqli.dbi.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php index 3d8a2e28c2..dcec04c546 100644 --- a/libraries/dbi/mysqli.dbi.lib.php +++ b/libraries/dbi/mysqli.dbi.lib.php @@ -66,8 +66,11 @@ function PMA_DBI_real_connect($link, $host, $user, $password, $dbname, $server_p { global $cfg; - if ($cfg['PersistentConnections'] || $persistent) { - $host = 'p:' . $host; + // mysqli persistent connections only on PHP 5.3+ + if (PMA_PHP_INT_VERSION >= 50300) { + if ($cfg['PersistentConnections'] || $persistent) { + $host = 'p:' . $host; + } } if ($client_flags === null) { return @mysqli_real_connect(