From: Mr. E23 Date: Sat, 13 Dec 2003 22:38:26 +0000 (+0000) Subject: Removed use of PHP persistent connections. Se URL below for details. X-Git-Tag: 1.3.0beta1~1251 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles_versions%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=b502c51bd30afef38a0cc764d3043a62838fe8f7;p=lhc%2Fweb%2Fwiklou.git Removed use of PHP persistent connections. Se URL below for details. http://meta.wikipedia.org/wiki/Why_persistent_connections_are_bad --- diff --git a/includes/DatabaseFunctions.php b/includes/DatabaseFunctions.php index ce0f7ac7ec..565d8c3999 100644 --- a/includes/DatabaseFunctions.php +++ b/includes/DatabaseFunctions.php @@ -33,19 +33,11 @@ function wfGetDB( $altuser = "", $altpassword = "", $altserver = "", $altdb = "" } if ( ! $wgDBconnection ) { - @$wgDBconnection = mysql_pconnect( $wgDBserver, $wgDBuser, $wgDBpassword ) + @$wgDBconnection = mysql_connect( $wgDBserver, $wgDBuser, $wgDBpassword ) or wfEmergencyAbort(); - if( !mysql_select_db( $wgDBname, $wgDBconnection ) ) { - /* Persistent connections may become stuck in an unusable state */ - wfDebug( "Persistent connection is broken?\n", true ); - - @$wgDBconnection = mysql_connect( $wgDBserver, $wgDBuser, $wgDBpassword ) - or wfEmergencyAbort(); - - @mysql_select_db( $wgDBname, $wgDBconnection ) - or wfEmergencyAbort(); - } + @mysql_select_db( $wgDBname, $wgDBconnection ) + or wfEmergencyAbort(); } # mysql_ping( $wgDBconnection ); return $wgDBconnection;