I've made an application in php that is developed in CodeIgniter
. I want test my application on my hosting website hostinger, so I've uploaded all files and configure the script for connect to the database. But I got this message:
Unable to connect to your database server using the provided settings.
In my Hostinger account information I can see:
host: http://xxx.xx.xx
database host: xxx.xxx.xxx
database name: xxx
database username: xxx
database password: ******
This is my configuration
file:
<?php
class SystemConfiguration {
// General Settings
public static $base_url = 'http://primodebug.esy.es/Calendario/';
// Database Settings
public static $db_host = 'xxx';
public static $db_name = 'xxx';
public static $db_username = 'xxx';
public static $db_password = '*****';
// Google Calendar API Settings
public static $google_sync_feature = FALSE; // Enter TRUE or FALSE;
public static $google_product_name = '';
public static $google_client_id = '';
public static $google_client_secret = '';
public static $google_api_key = '';
}
/* End of file configuration.php */
/* Location: ./configuration.php */
What am I doing wrong?
UPDATE CodeIgniter Config file
$active_group = 'default';
$active_record = TRUE;
require_once dirname(dirname(dirname(__FILE__))) . '/configuration.php';
$db['default']['hostname'] = SystemConfiguration::$db_host;
$db['default']['username'] = SystemConfiguration::$db_username;
$db['default']['password'] = SystemConfiguration::$db_password;
$db['default']['database'] = SystemConfiguration::$db_name;
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
/* End of file database.php */
/* Location: ./application/config/database.php */