在 Joomla 中连接到 PGSQL 数据库时出错

编程入门 行业动态 更新时间:2024-10-20 16:49:03
本文介绍了在 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 数据库时出错

本文发布于:2023-10-24 14:30:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524184.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   数据库   Joomla   PGSQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!