PHP 5.6 PostgreSQL: Call to undefined function pg_connect()

zwerfkat

Verified User
Joined
Sep 23, 2011
Messages
15
Hi,

Want to use PostgreSQL with PHP 5.6 on CentOS7, but I cannot manage to get it working.

Installed postgresql10 successfully, using:
yum install -y postgresql10-server postgresql10

Created a database etc, all seems to be working.

Added these configure options to PHP5.6:
--with-pdo-pgsql
--with-pgsql=/var/lib/pgsql/10

and rebuilded PHP:
./build php_expert 5.6 php-fpm

After restarting PHP and httpd, I am still getting this error when trying to connect to my database:
Call to undefined function pg_connect()

PHPinfo() shows:
pdo_pgsql
PDO Driver for PostgreSQLenabled
PostgreSQL(libpq) Version9.2.24
Module version1.0.2
Revision$Id: 0e858dd2051ca8c2fd3c781909a0670ab5fecd36 $

PDO
PDO supportenabled
PDO driversmysql, pgsql, sqlite


What I am doing wrong? Any help appriciated!
 
Back
Top