Welcome Guest, Not a member yet? Register   Sign In
core/Loader can't connect to database
#1

[eluser]Unknown[/eluser]
Hi all.

I'm moving some web sites developed with CI to a new server and I have a strange issue. The default host on my server works as expected but all other virtual hosts generate this error:

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: core/Loader.php

Line Number: 224

The config/database.php settings are identical for all the sites in question:

$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'user';
$db['default']['password'] = 'pass';
$db['default']['database'] = 'db';
$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;

Is this an httpd.conf setting somewhere? Thanks for any pointers.
#2

[eluser]Sudz[/eluser]
Check and get confirmed these parameters are correct or not, what value you have set for new server:
Code:
$db[‘default’][‘hostname’] = ‘localhost’;
$db[‘default’][‘username’] = ‘user’;
$db[‘default’][‘password’] = ‘pass’;
$db[‘default’][‘database’] = ‘db’;




Theme © iAndrew 2016 - Forum software by © MyBB