FuelPHP Undefined class constant MYSQL_ATTR_COMPRESS

TAGs: 1 Comment

Posted By: eligeske on in FuelPHP, PHP

During migration using OIL in windows I ran across the error of an Undefined constant MYSQL_ATTR_COMPRESS.

I checked first the php extensions and made sure PHP_PDO_MYSQL was enabled. It was.

It appears that FuelPHP has some pretty powerful configurations. And after translating a google search page from Japanese to English found out that you can disable the Compression of PDO. This allowed me to use the migration. But is only a blind eye to it. If anyone knows why this happens and has a fix, please comment below. For those stuck add the following to your /app/config/development/db.php:

return array(
   'default' => array(
   'connection' => array(
      'dsn' => 'mysql:host=localhost;dbname=fuel_db',
      'username' => 'root',
      'password' => 'root',
      'compress' => false  // ADD <-- This to turn compression off


One Response to "FuelPHP Undefined class constant MYSQL_ATTR_COMPRESS"

  1. Harro Verton says:

    By mistake the default for release 1.3 was set to true, generating this error when using a platform that doesn’t support this flag, and no explicit “false” was configured.

    This has been corrected for 1.4, where “false” is the default.

Learning DHTMLX Suite UI

Learn the foundation of the DHTMLX Suite quickly while building a single page application with multiple components in harmony.

Popular post