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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:30:21+00:00 2026-06-05T21:30:21+00:00

Background: Using unix, codeigniter from localhost. I’d like to run a controllers via a

  • 0

Background: Using unix, codeigniter from localhost.

I’d like to run a controllers via a command-line (CLI).
Consequently I’m following this CodeIgniter tutorial and the example works fine.

However when I use it with functions which need to connect to the database, then it appears the following error in the command-line.

Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 347

The strange thing is when I access to the same function via URL it works.
How that’s possible?

Note: The function I pretend to introduce in the command-line is to update the database (it doesn’t print anything).

EDIT:
I’m getting closer.
I’ve changed the hostname from ‘localhost’ to ‘127.0.0.1’ and it works. Why?

  • 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-05T21:30:24+00:00Added an answer on June 5, 2026 at 9:30 pm

    I’ve changed the hostname from ‘localhost’ to ‘127.0.0.1’ and it works.

    Explanation

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

Sidebar

Related Questions

Hi For my project I would like to run some jobs in background using
Coming from a background using Visual Studio and Notepad++ I'm used to the indent
Trying to execute shell command in background using pythons commands module >>>import commands >>>output
Background: Using CodeIgniter with this MongoDB library . This is my first go-round with
I am from Unix programming background and am facing a unique behavior/problem during porting
I need to run multiple task in the background using backgroundwoker e.g dim mybacgroundwokers(10)
How do I separate the body/content area of my site from the background using
I'm trying to execute a command in the background using PHP so the web
I want to run a PHP script in the background using another PHP script.
Background Using boost and other similar libraries is the easiest way to find compiler

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.