Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71525 invoked from network); 31 Aug 2008 17:04:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2008 17:04:41 -0000 Authentication-Results: pb1.pair.com header.from=robert@interjinn.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=robert@interjinn.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain interjinn.com from 66.11.173.122 cause and error) X-PHP-List-Original-Sender: robert@interjinn.com X-Host-Fingerprint: 66.11.173.122 unknown Received: from [66.11.173.122] ([66.11.173.122:22684] helo=interjinn.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/2A-27196-31FCAB84 for ; Sun, 31 Aug 2008 13:04:19 -0400 Received: from [192.168.1.3] (blobule.suds [192.168.1.3]) by interjinn.com (Postfix) with ESMTP id 76AA111FB77; Sun, 31 Aug 2008 13:04:07 -0400 (EDT) To: RQuadling@GoogleMail.com Cc: Ronald Chmara , Lupus Michaelis , internals@lists.php.net In-Reply-To: <10845a340808310937n259a3da7w95e28eef7e89c0f0@mail.gmail.com> References: <10845a340808291509g9d4c222y44a49cde60eee883@mail.gmail.com> <42.C0.27196.DA2B8B84@pb1.pair.com> <1220065117.9386.0.camel@localhost> <9DA18726-06ED-489D-80EC-7530C4AA7CC1@opus1.com> <10845a340808310937n259a3da7w95e28eef7e89c0f0@mail.gmail.com> Content-Type: text/plain Organization: InterJinn Date: Sun, 31 Aug 2008 13:04:28 -0400 Message-ID: <1220202268.9386.212.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Closing mysql_pconnects. From: robert@interjinn.com (Robert Cummings) On Sun, 2008-08-31 at 17:37 +0100, Richard Quadling wrote: > > What I'm trying to determine is how persistent connections are ignored > when mysql_close() is called against a connection which was opened via > mysql_pconnect(). > > I've looked at the source and can see that mysql_connect and > mysql_pconnect call > php_mysql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, x); where x is > 1 or 0 (persistent or not). > > But in mysql_close(), there is no reference to the persistent setting > of MySG(allow_persistent) or any other persistent related variable. > > So, I'm missing something. And that's why I asked. >From my browsing of the code, specifically related to following the "persistent" var, it appears that php_mysql_do_connect() doesn't add it to the resource list of normal connections when the connection is created. As such it wouldn't get closed if you attempted to close it. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP