Hello,
I’m pretty new to codeingiter but I’ve think i’ve manage it pretty well so far. I have this issue which I can’t figure out.
I do get this error upon loading the site:
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346
Now, you may think. Ah it’s the database connection strings. But no, it’s not. They are correct.
I checked them out by the debug script made by john_betong
echo '<pre>';
print_r($db['default']);
echo '</pre>';
echo 'Trying to connect to database: ' .$db['default']['database'];
$dbh=mysql_connect
(
$db['default']['hostname'],
$db['default']['username'],
$db['default']['password'])
or die('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ($db['default']['database']);
echo '<br /> Connected OK:' ;
die( 'file: ' .__FILE__ . '--> Line: ' .__LINE__);
I get connected OK.
So on this line 346 I have this code in core/loader.php
// Load the DB class
$CI->db =& DB($params, $active_record);
Anyone?
Many thanks in advance!
