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

编程入门 行业动态 更新时间:2024-10-20 20:56:20
本文介绍了在Joomla中连接到PGSQL数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

Could not connect to the database. Connector returned number: Error connecting to PGSQL database.

这并不能告诉我很多.有什么想法吗?

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

发布评论

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

>www.elefans.com

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