Codeigniter : database configuration

Posted by nppCods on Stack Overflow See other posts from Stack Overflow or by nppCods
Published on 2012-06-04T10:31:42Z Indexed on 2012/06/04 10:40 UTC
Read the original article Hit count: 135

Filed under:

I am beginner for CI so don’t have good knowledge.

My problem is:

I am not using any database. All the records are fetched from JSON. Therefore I don’t think I need to configure database…

As said by CI, it doesn’t necessarily ask for database.

So my database.php configuration is :

$active_group = ‘default’;
$active_record = FALSE;

$db[‘default’][‘hostname’] = ‘’;
$db[‘default’][‘username’] = ‘’;
$db[‘default’][‘password’] = ‘’;
$db[‘default’][‘database’] = ‘’;
$db[‘default’][‘dbdriver’] = ‘mysql’;
$db[‘default’][‘dbprefix’] = ‘’;
$db[‘default’][‘pconnect’] = TRUE;
$db[‘default’][‘db_debug’] = TRUE;
$db[‘default’][‘cache_on’] = FALSE;
$db[‘default’][‘cachedir’] = ‘’;
$db[‘default’][‘char_set’] = ‘utf8’;
$db[‘default’][‘dbcollat’] = ‘utf8_general_ci’;
$db[‘default’][‘swap_pre’] = ‘’;
$db[‘default’][‘autoinit’] = TRUE;
$db[‘default’][‘stricton’] = FALSE;

It works in my local system but doesn’t work in live server. I am so surprised.

Then I provided hostname, username, password and dbdriver, it works.

My question is that, is that necessary to provide all the details if I am not using database?

Thank you for your suggestion.

© Stack Overflow or respective owner

Related posts about codeigniter