core/Loader can't connect to database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: core/Loader can't connect to database (/showthread.php?tid=50432) |
core/Loader can't connect to database - El Forum - 03-26-2012 [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. core/Loader can't connect to database - El Forum - 03-27-2012 [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’; |