Re: Re: Closing mysql_pconnects.

From: Date: Sun, 31 Aug 2008 17:04:28 +0000
Subject: Re: Re: Closing mysql_pconnects.
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-40190@lists.php.net to get a copy of this message
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

« previous php.internals (#40190) next »