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 8178163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:41:49+00:00 2026-06-06T23:41:49+00:00

Everything works fine when I have my application on my local server, but I

  • 0

Everything works fine when I have my application on my local server, but I can’t access the database on the production instance.
The index page loads with no problems (no DB access is required there).
As soon as I click to a page which needs DB access, I get an error message:

Fatal error: Call to a member function result_array() on a non-object in /home/… line 48.
Here is the code it fails on:

47: $query = $this->db->get($table_name);
48: return $query->result_array();

I deliberately changed the database.php file so that my DB credentials were incorrect, and had the same issue. I’m almost certain the credentials are correct though.
Is there somewhere else that affects the database connection?
Like the .htaccess?

  • 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-06T23:41:50+00:00Added an answer on June 6, 2026 at 11:41 pm

    Thank you all for your help with this!
    I found the problem. It was indeed a database connectivity issue, but was a rookie mistake.

    I thought that the $config[‘hostname’] should be the url of the website. But instead, it was just localhost. Hopefully nobody makes this silly mistake again.

    $config['hostname'] = "localhost";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing Swing application, and everything works fine usually. But I have an GUI
I have my pickerview set up and everything works fine, but right now I
The CollapsibleAccordion. I have two canvas inside the CollapsibleAccordion, and everything works fine, but
I have installed Qt and Qt for VS plugin. Everything works fine, UI applications
I have just added a product and everything works fine. The product is a
I have integrated to my project the mapkit framework and everything works fine. I
I have a windows service and use nlog for logging. Everything works fine when
I have developed a web app using a webservice. Everything works fine in the
I have an ASP.NET website that is contacting a webservice. Everything works fine connecting
I have a module that reads the StandardError of a process. Everything works fine,

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.