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
What I am doing wrong? Any help appriciated!
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 PostgreSQL | enabled |
---|---|
PostgreSQL(libpq) Version | 9.2.24 |
Module version | 1.0.2 |
Revision | $Id: 0e858dd2051ca8c2fd3c781909a0670ab5fecd36 $ |
PDO
PDO support | enabled |
---|---|
PDO drivers | mysql, pgsql, sqlite |
What I am doing wrong? Any help appriciated!