I am new on codeigniter 3.0 . I am uploading my project on my server. but i am facing some errors that have stuck me. But it is working fine on local. i have googled but did not find my answers. I think there are some database configuration issue.
Here is my database.php
$db['default'] = array(
'dsn' => '',
'hostname' => 'http://selectomobile.com/freber',
'username' => 'my username',
'password' => 'mypassword',
'database' => 'mydatabasename',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
There are some errors that are irritating me.
1.
A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known Filename: mysqli/mysqli_driver.php Line Number: 161 Backtrace: File: /home/selectom/public_html/freber/index.php Line: 292 Function: require_once
2.
A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known Filename: mysqli/mysqli_driver.php Line Number: 161 Backtrace: File: /home/selectom/public_html/freber/index.php Line: 292 Function: require_once
3.
A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/selectom/public_html/freber/system/core/Exceptions.php:272) Filename: core/Common.php Line Number: 568 Backtrace: File: /home/selectom/public_html/freber/index.php Line: 292 Function: require_once
4.
A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: core/CodeIgniter.php Line Number: 500
localhostor IP address of server where MySQL is installed. - Tpojka