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

  • Home
  • SEARCH
  • 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 8139619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:53:14+00:00 2026-06-06T11:53:14+00:00

Possible Duplicate: Problem with database in CodeIgniter Alright, I’ve googled this the last two

  • 0

Possible Duplicate: Problem with database in CodeIgniter

Alright, I’ve googled this the last two days to no avail. I’m received a few hits from SO and codeigniter’s support forums and they’re mostly misleading threads and “oops” mistakes by other people. I actually have two questions, but one I can hold onto for the sake of solving this mind boggler.

My Setup:

  • FRESH CodeIgniter 2.1
  • IIS 7.5, FastCGI+PHP 5.4.4
  • Windows 7 Professional x64

Alright so,

  1. I added the following line to my “welcome” controller, before the view gets loaded. CodeIgniter spits out the “Unable to load the requested class: database”. I tried “Database” too, same thing.

    $this->load->library('database');

  2. I’ve tried $autoload['libraries'] = array('database'); which yields a blank page.

  3. I’ve also tried $autoload['libraries'] = array('Database'); which yields the preview page as seen in #1.
  4. I added error_reporting(E_ALL) above the inline load from the welcome controller and nothing else showed up.

I can only come to blame my inexperience with IIS that could be causing the issue.

EDIT: So, #1 has been fixed, auto-loading database, and, thanks to Ben, I had forgotten about “load->database(...)” method…

Anyway, my current error now is just a white page when the database is loaded via autoload. My code is just set to autoload the database and display the default view provided with CodeIgniter. Removing the database autoload causes the view to show…

  • 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-06T11:53:16+00:00Added an answer on June 6, 2026 at 11:53 am

    Your #2 option most likely worked fine, and some other unreported PHP error (check your CI logs) caused the blank page.

    To manually load the database, use
    $this->load->database();

    see this link for more

    library() is for custom library files.

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

Sidebar

Related Questions

Possible Duplicate: SQL Server Database query help Hi, I have a problem that I
Possible Duplicate: problem with template inheritance This code doesn't compile in GCC: template <typename
Possible Duplicate: Sql server version problem when database restore I would like to restore
Possible Duplicate: Database Deployment issues I followed the steps in this video: http://www.asp.net/iis/videos/developing-and-deploying-in-a-shared-hosting I
Possible Duplicate: Problem with processing individual strings stored in an array of pointers to
Possible Duplicate: Java - Regex problem I have list of URLs of types: http://www.example.com/pk/etc
Possible Duplicate: mail() header problem for html email I'm using the following for $headers
Possible Duplicate: C++ std::string conversion problem on Windows How to convert std::string to LPCSTR?
Possible Duplicate: Raphaeljs and Internet Explorer, problem when clicking an element I'm trying to
Possible Duplicate: Android Launch an application from another application I am having a problem

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.