PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, December 31, 2021

[FIXED] CodeIgniter without a Database?

 December 31, 2021     codeigniter, mysql, php     No comments   

Issue

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?


Solution

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



Answered By - jalal
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing