Welcome Guest, Not a member yet? Register   Sign In
Database error
#1

[eluser]bndk[/eluser]
Hey guys,

I seem to have a problem connecting to my DB with CI. The DB is external, and I've had no problems connecting to it using regular PHP.

I added this line to my autload.php file
Code:
$autoload['libraries'] = array('database');
and keep getting the same error in my application:
Quote:Unable to connect to your database server using the provided settings.
The error refers to line 124 in the DB_driver.php file:
Code:
// No connection resource?  Throw an error
  if ( ! $this->conn_id)
  {
   log_message('error', 'Unable to connect to the database');

   if ($this->db_debug)
   {
   $this->display_error('db_unable_to_connect'); // <-- LINE 124
   }
   return FALSE;
  }


I'm 100% sure that the database config file (host, db name, password, etc.) is set up correctly.

Any ideas on why it doesn't work?

Thanks!
#2

[eluser]InsiteFX[/eluser]
The error is stating that something is wrong in your configuration.
./application/config/database.php

Double check your settings in that file.
#3

[eluser]bndk[/eluser]
I guess I should be more careful about being 100% sure of something in the future.
The error was indeed in my configuration and is now solved.

Thanks

- bndk




Theme © iAndrew 2016 - Forum software by © MyBB