From: Brion Vibber Date: Thu, 28 Jan 2010 07:51:22 +0000 (-0800) Subject: Don't preemptively close existing DB connections for web views (needed to keep #... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ffaaf9de4a1da25f6168c53a33b25683ae134c61;p=quix0rs-gnu-social.git Don't preemptively close existing DB connections for web views (needed to keep # of conns from going insane on multi-site queue daemons, so just doing for CLI) May, or may not, help with mystery session problems --- diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 2cc6377f83..b60aa7911d 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -428,7 +428,7 @@ class Memcached_DataObject extends DB_DataObject // // WARNING WARNING if we end up actually using multiple DBs at a time // we'll need some fancier logic here. - if (!$exists && !empty($_DB_DATAOBJECT['CONNECTIONS'])) { + if (!$exists && !empty($_DB_DATAOBJECT['CONNECTIONS']) && php_sapi_name() == 'cli') { foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $index => $conn) { if (!empty($conn)) { $conn->disconnect();