Welcome Guest, Not a member yet? Register   Sign In
Unable to connect to your database server using the provided settings. Filename: core/Loader.php Line Number: 346
#1

[eluser]Unknown[/eluser]
Hi im new in the forum.

I've readed all the solutions i found on this issue yet no one worked for me so far.

Every time i try to connect to de db i see this error:

Quote:A Database Error Occurred

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

Filename: core/Loader.php

Line Number: 346

This is my database.php config:

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

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

I've tryed to connect without using ci with this code:

Code:
echo '<pre>';
print_r($db['default']);
echo '</pre>';

$link = mysqli_connect($db['default']['hostname'],$db['default']['username'],$db['default']['password'],$db['default']['database']) or die("Error " . mysqli_error($link));
echo 'Conecte';
die();

When i do this it connects to the db.

Following another post here i've dissabled the db_debug param. It didn't show the error but when i try to access the db it's not there so it isn't connected.

I've tryied also to change DB_driver.php where it says :

Code:
$this->display_error('db_unable_to_connect');

I've changed it to:

Code:
die(mysqli_connect_error());
$this->display_error('db_unable_to_connect');

It only shows a blank page, no error. I don't know what to do anymore.

Thanks in advance.



Messages In This Thread
Unable to connect to your database server using the provided settings. Filename: core/Loader.php Line Number: 346 - by El Forum - 08-17-2014, 10:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB