在 Joomla 中连接到 PGSQL 数据库时出错 [英] Error connecting to PGSQL database in Joomla

查看:19
本文介绍了在 Joomla 中连接到 PGSQL 数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Postgres 安装 Joomla,但在安装程序中出现以下错误:

I am trying to install Joomla using Postgres and in the installer I have the following error:

无法连接到数据库.连接器返回编号:连接到 PGSQL 数据库时出错.

这并没有告诉我太多.有什么想法吗?

This isn't telling me very much. Any ideas?

推荐答案

不幸的是,安装程序没有返回真正的错误.

Unfortunately the installer does not return the real error.

以下是一些一般提示:

  • 确保提供的数据库已经存在
  • 检查您的数据库是否需要某些特定设置,例如不同的端口或sslmode=require

将您的连接详细信息放在一个普通的 php 文件中并运行脚本,启用错误报告:

Put your connection details in a normal php file and run the script, having error reporting enabled:

<?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)

When running the script you might get a proper error. When you get a resource, the connection is successful: resource(4) of type (pgsql link)

这篇关于在 Joomla 中连接到 PGSQL 数据库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆