FreeBSD-11.0
Apache-2.4 (installed as a binary package from the ports collection)
PHP-5.6.30 (installed as a binary package from the ports collection)
Moodle-3.2 (installed as a binary package from the ports collection)
PG-9.6 (remote host)
I am moving a Moodle site from a Linux system to a FreeBSD system. The database server host is unchanged between both installations. On the FreeBSD host I have configured config.php to use the same credentials as those present on the existing system. I have verified that config-dist.php is using the correct adapter:
# grep pgsql config-dist.php
$CFG->dbtype = 'pgsql'; // 'pgsql', 'mariadb', 'mysqli', 'mssql', 'sqlsrv' or 'oci'
I have verified that PHP is configured with the correct adapter:
# php -i
. . .
PDO
PDO support => enabled
PDO drivers => mysql, pgsql
pdo_pgsql
. . .
pdo_pgsql
PDO Driver for PostgreSQL => enabled
PostgreSQL(libpq) Version => 9.3.15
Module version => 1.0.2
Revision => $Id: 0e858dd2051ca8c2fd3c781909a0670ab5fecd36 $
. . .
I have checked that the necessary ports are not fire-walled. I have verified on the pg dbms host that the pg_hpa.conf file has the necessary entries to permit access from the new host. I have double checked the Apache virtual host configuration and am logging no errors.
What I see when I visit our Moodle site is this:
Error: database driver problem detected
The site administrator should verify server configuration
PHP has not been properly configured with the PGSQL extension so that it can communicate with PostgreSQL. Please check your php.ini file or recompile PHP.
Any ideas of what could be wrong and how to fix it?