Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change mysql_connect to mysql_pconnect throughout

  • Loading branch information...
commit e6496b9b091f7f29a8884c59450986731c93d64a 1 parent 3108625
@lauraxt authored
View
2  bouncer/php/lib/db.php
@@ -16,7 +16,7 @@ function db_connect($host='localhost',$user=null,$password=null)
{
static $dbh = null;
if (!empty($host) && isset($user) && isset($password)) {
- $dbh = @mysql_connect($host,$user,$password);
+ $dbh = @mysql_pconnect($host,$user,$password);
}
if (is_resource($dbh)) {
return $dbh;
View
2  bouncer/php/lib/sdo.php
@@ -55,7 +55,7 @@ function connect($dbtype='db_write')
$details = $this->db_details[$dbtype];
- $db = @mysql_connect($details['host'],$details['user'],$details['pass']);
+ $db = @mysql_pconnect($details['host'],$details['user'],$details['pass']);
if (is_resource($db) && !@mysql_db_name($db)) {
@mysql_select_db($details['name'],$db);
$this->$dbtype = $db;
View
2  bouncer/php/test.php 100644 → 100755
@@ -58,7 +58,7 @@
global $results;
// Check Main Database
- $dbh = @mysql_connect(DBHOST.':'.DBPORT,DBUSER,DBPASS);
+ $dbh = @mysql_pconnect(DBHOST.':'.DBPORT,DBUSER,DBPASS);
testo('Connect to MAIN database ('.DBHOST.')', is_resource($dbh));
testo('Select MAIN database ('.DBNAME.')', @mysql_select_db(DBNAME, $dbh));
unset ($dbh);
Please sign in to comment.
Something went wrong with that request. Please try again.