Skip to content

Commit

Permalink
set PDO MySQL compression to false by default, to avoid mysqlnd issues
Browse files Browse the repository at this point in the history
  • Loading branch information
WanWizard committed Sep 11, 2012
1 parent 250482b commit 350234f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/database/pdo/connection.php
Expand Up @@ -58,7 +58,7 @@ public function connect()
'username' => null,
'password' => null,
'persistent' => false,
'compress' => true,
'compress' => false,
));

// Clear the connection parameters for security
Expand All @@ -77,7 +77,7 @@ public function connect()
$attrs[\PDO::ATTR_PERSISTENT] = true;
}

if (in_array(strtolower($this->_db_type), array('mysql', 'mysqli')) and $compress and defined(\PDO::MYSQL_ATTR_COMPRESS))
if (in_array(strtolower($this->_db_type), array('mysql', 'mysqli')) and $compress)
{
// Use client compression with mysql or mysqli (doesn't work with mysqlnd)
$attrs[\PDO::MYSQL_ATTR_COMPRESS] = true;
Expand Down

0 comments on commit 350234f

Please sign in to comment.