the code is written for the connection but the function pg_connect() doesn't work with the framework and database i.e. codeigniter and postgreSQL.
to connect with database i have written the code for the config/database.php but the error is persistent that the connection is unable to connect.
i completed the information for the config/database.php file the details are complete and provided as per requirement for the database connection.
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => 'localhost',
'hostname' => 'localhost',
'username' => 'puneetchhabra',
'password' => 'shambhu',
'database' => 'success_story',
'dbdriver' => 'postgre',
'port' => '',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
error message
Severity: Warning
Message: pg_connect(): Unable to connect to PostgreSQL server: missing "=" after "localhost" in connection info string
Filename: postgre/postgre_driver.php
Line Number: 154
Unable to connect to your database server using the provided settings.
Filename: core/CodeIgniter.php
Line Number: 518
pg_pconnect()instead if you made such calls. try to empty the dsn also. a lot you can try, just keep searching.