Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7813267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:47:32+00:00 2026-06-02T04:47:32+00:00

I am trying to use the sqlite database with codeigniter. I created a table

  • 0

I am trying to use the sqlite database with codeigniter. I created a table in it and then loaded the database in the config file as;

$db['default']['hostname'] = '';
$db['default']['username'] = '';
$db['default']['password'] = '';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'sqlite';
$db['default']['dbprefix'] = '';

And autoloaded the db library in autoload.php but the view that I render from the controller is blank even does not display any error. When I do not autoload this file then the viw renders correctly. I am not sure what is the problem here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:47:33+00:00Added an answer on June 2, 2026 at 4:47 am

    CI2 has changed a few bits. First of all you need the sqlite protocol and path in the ‘hostname’ parameter, and you need to set the dbdriver as ‘pdo’. Oh, and you obviously need the PDO sqlite driver installed on the server:

    $db['default']['hostname'] = 'sqlite:/var/my.db';
    $db['default']['username'] = '';
    $db['default']['password'] = '';
    $db['default']['database'] = '';
    $db['default']['dbdriver'] = 'pdo';
    $db['default']['dbprefix'] = '';
    

    There is also a bug in the release I downloaded which casuses DB errors to be thrown incorrectly. If you have this, google the output with PDO exception and you should find the bug. Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use fts in my sqlite database, i have created a
Im trying to use an sqlite database in xcode 4.2 and ios5 sdk. The
I use a SQLite database and Entity Framework (with .net framework 3.5). I'm trying
I'm trying to use DbLinq with a SQLite database, but I'm running into a
I'm trying to use an SQLite database to store some data for my app.
I'm trying to use SQLite's C API to open a database and access some
I'm trying to use sqlite as database for a symbian app but I can't
I am currently trying to use an SQLite database with a DataGridView in C#.
I'm trying to use an in-memory SQLite database to test my data layer which
I'm trying to use SqlAlchemy to make Sqlite database tables inside of Pylons. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.