{"record":{"id":"243149c0df02c2ec","repo":"bcit-ci/CodeIgniter","slug":"query-builder-not-enabled-for-the-configured-datab","errorCode":null,"errorMessage":"Query Builder not enabled for the configured database. Aborting.","messagePattern":"Query Builder not enabled for the configured database\\. Aborting\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"system/libraries/Session/drivers/Session_database_driver.php","lineNumber":91,"sourceCode":"\t// ------------------------------------------------------------------------\n\n\t/**\n\t * Class constructor\n\t *\n\t * @param\tarray\t$params\tConfiguration parameters\n\t * @return\tvoid\n\t */\n\tpublic function __construct(&$params)\n\t{\n\t\tparent::__construct($params);\n\n\t\t$CI =& get_instance();\n\t\tisset($CI->db) OR $CI->load->database();\n\t\t$this->_db = $CI->db;\n\n\t\tif ( ! $this->_db instanceof CI_DB_query_builder)\n\t\t{\n\t\t\tthrow new Exception('Query Builder not enabled for the configured database. Aborting.');\n\t\t}\n\t\telseif ($this->_db->pconnect)\n\t\t{\n\t\t\tthrow new Exception('Configured database connection is persistent. Aborting.');\n\t\t}\n\t\telseif ($this->_db->cache_on)\n\t\t{\n\t\t\tthrow new Exception('Configured database connection has cache enabled. Aborting.');\n\t\t}\n\n\t\t$db_driver = $this->_db->dbdriver.(empty($this->_db->subdriver) ? '' : '_'.$this->_db->subdriver);\n\t\tif (strpos($db_driver, 'mysql') !== FALSE)\n\t\t{\n\t\t\t$this->_platform = 'mysql';\n\t\t}\n\t\telseif (in_array($db_driver, array('postgre', 'pdo_pgsql'), TRUE))\n\t\t{\n\t\t\t$this->_platform = 'postgre';","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/bcit-ci/CodeIgniter/blob/3658d731eaabe6117298a105ffb5b9dd59e190ce/system/libraries/Session/drivers/Session_database_driver.php#L73-L109","documentation":"Error \"Query Builder not enabled for the configured database. Aborting.\" thrown in bcit-ci/CodeIgniter.","triggerScenarios":"Thrown at system/libraries/Session/drivers/Session_database_driver.php:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3658d731eaabe6117298a105ffb5b9dd59e190ce","analyzedAt":"2026-08-17T02:34:56.929Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}