Sorry if this is a simple question, is it possible to load codeigniter without a db setup?
I have sess_use_db set to false in the config, I tried renaming database.php to something else but it still wants to load it, I turned active records off also.
I tried commenting everything out in the database.php and it said no database settings found, autoload doesn't load the db.
Is this even possible?
Theoretically, there should be no reason that CI needs a database. sess_use_db=false just stops CI from storing it's session information in a database. Check that you are not autoloading the database files in config/autoload.php
You could set the database type to 'sqlite' in config/database.php if you simply want to avoid setting up mysql, but you will need to have sqlite installed.
HTH
I know its an old thread but answers for a clearer answer.
You need to check in two places config.php
and autoload.php
as the website depends on two things which depend on database, which are autoload 'database' & 'sessions' which we need to remove.
But for sessions
, rather than eliminating it from autoload, we can keep it by just changing its configuration setting.
In Config.php : you need to modify 'session' settings by changing its driver to:
$config['sess_driver'] = 'files';
.
In autoload.php : you need to modify the 'library' by removing "database" :
$autoload['libraries'] = array('session', 'form_validation');
Also, do make sure that your site doesn't have any funtions calling for database.
That should fix your issues.
You just need to remove or comment the following line from autoload.php file in config folder:
$autoload['libraries'] = array('database','session');
I think you should check your $autoload['libraries']
and remove database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With