views:

61

answers:

3

Hi everyone!

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?

+3  A: 

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

jalal
I actually had a controller loading the database instead of autoload, so i commented it out and its working without mysql! thanks for your efforts
Pete Herbert Penito
+1  A: 

I would have thought so. I don't see why you then wouldn't be able to hard-code data within your models.

Martin Bean
+1  A: 

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

Steven Xu