Skip to content

Instantly share code, notes, and snippets.

@paulobunga
Last active July 27, 2018 11:04
Show Gist options
  • Save paulobunga/423ea38d3e02fe7d2ebe5361c4c36335 to your computer and use it in GitHub Desktop.
Save paulobunga/423ea38d3e02fe7d2ebe5361c4c36335 to your computer and use it in GitHub Desktop.
//Add this to fetch the CLEARDB_DATABASE_URL
$url = parse_url(getenv("CLEARDB_DATABASE_URL"));
$db['default'] = array(
'dsn' => '',
'hostname' => $url["host"],
'username' => $url["user"],
'password' => $url["pass"],
'database' => substr($url["path"], 1),
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment