Alright so for some reason no matter what I do CI is refusing to connect to database. I've tried using another DB and so on and nothing happens
This is what I've ended up using as alternative way to connect to DB since default wont work either.
class ContentLoader extends CI_Model {
public function __construct() {
$this->load->database();
}
public function foo() {
$res = $this->load->database();
if($res == false) {
echo "conn_failed";
}
}
}
And this is my config
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'first_igniter',
'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
);