Sample Header Ad - 728x90

"undefined function pg_pconnect()" when connecting to Postgres from CodeIgniter

0 votes
1 answer
2523 views
I just installed Postgresql and pgadmin in my Ubuntu system. I can create a database from the pgadmin interface and everything seems ok, but when I try to connect to the database from my CodeIgniter application it cannot not connect. It shows an error like: An uncaught Exception was encountered > Type: Error > > Message: Call to undefined function pg_pconnect() > > Filename: /my codeigniter application > path/system/database/drivers/postgre/postgre_driver.php My database configuration is: $db['postgres_db'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'postgres', 'password' => '1234', 'database' => 'finance', 'dbdriver' => 'postgre', 'dbprefix' => '', 'pconnect' => TRUE, '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 ); How can I resolve this problem?
Asked by jpsai (1 rep)
Jun 28, 2018, 10:13 AM
Last activity: Jun 18, 2025, 09:10 AM