我正在尝试使用 Postgres 安装 Joomla,在安装程序中出现以下错误:
Could not connect to the database. Connector returned number: Error connecting to PGSQL database.
这并没有告诉我太多。有任何想法吗?
我正在尝试使用 Postgres 安装 Joomla,在安装程序中出现以下错误:
Could not connect to the database. Connector returned number: Error connecting to PGSQL database.
这并没有告诉我太多。有任何想法吗?
不幸的是,安装程序没有返回真正的错误。
以下是一些一般提示:
sslmode=require
将您的连接详细信息放在一个普通的 php 文件中并运行脚本,启用错误报告:
<?php
$connection = 'host=127.0.0.1 port=5432 dbname=joomla3 user=postgres password=postgres';
$dbconn = pg_connect($connection);
var_dump($dbconn);
运行脚本时,您可能会收到正确的错误。获取资源后,连接成功:resource(4) of type (pgsql link)
检查 selinux 配置:
$ sudo setenforce Permissive
然后再试一次。如果可行,您可以在 /etc/selinux/config 禁用 selinux 并更改行
SELINUX=enforcing
经过
SELINUX=permissive