Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

i am getting the following error :

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

Filename: core/Loader.php

Line Number: 346

my database.php is :

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'usertest';
$db['default']['password'] = '';
$db['default']['database'] = 'usertest';
$db['default']['port']     = '5433';
$db['default']['dbdriver'] = 'postgre';
$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;

What is the possible solution. I do not want to $db['default']['db_debug'] = FALSE; as even after doing this i am still not able to connect to db.

EDIT : Changed the port to 5432. still it doesnt work

share|improve this question
    
Are you sure postgres is on port 5433? try telnet localhost 5433 from command line and see if you get a blank screen. –  user20232359723568423357842364 Jul 16 '13 at 20:31
    
Same question, Posgres's default port is 5432. –  Hieu Nguyen Jul 16 '13 at 21:50

2 Answers 2

Set Set $db['default']['pconnect'] = FALSE; and check once again.

share|improve this answer

Check your db driver name. I am pretty sure it is "postgres" and not "postgre."

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.