CodeIgniter without a database?

Sorry if this is a simple question, is it possible to downloadigniter code without installing db?

I have sess_use_db set to false in the configuration, I tried to rename database.php to something else, but it still wants to load it, I also disabled active entries.

I tried to comment everything in database.php and said that no database settings were found, autoload does not load db.

Is it possible?

+6
php mysql codeigniter
source share
5 answers

Theoretically, there should be no reason why CI needs a database. sess_use_db = false simply stops the CI from storing session information in the database. Make sure you are not loading the database files in config / autoload.php

You can set the database type in sqlite in config / database.php if you just want to avoid mysql setup, but you will need to install sqlite.

NTN

+8
source share

You just need to remove or comment on the following line from the autoload.php file in the config folder:

$autoload['libraries'] = array('database','session'); 
+7
source share

By default, CodeIgniter does not use a database at all.

+4
source share

I think you should check your $autoload['libraries'] and delete the database.

+2
source share

I would think so. I don’t understand why then you couldn’t hard code the data in your models.

+1
source share

All Articles