I am trying to connect CodeIgniter 3.0.6 with PostgreSQL, and am using an Apache HTTP server with PHP 7.0.5. I looked for some solution in the forums but I did not find anything about it.
Here is the database configuration:
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'password',
'database' => 'db_name',
'dbdriver' => 'postgre',
'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,
'port' => 5432
);
The error message is as follows:
An uncaught Exception was encountered
Type: Error
Message: Call to undefined function
pg_connect()
Filename: E:\xampp\htdocs\facturacion\system\database\drivers\postgre\postgre_driver.php
Line Number: 155