문제

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.

Here are some general tips:

  • make sure the provided database already exists
  • check if your database needs some specific settings, such as a different port or sslmode=require

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

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)

다른 팁

Check selinux configuration:

$ sudo setenforce Permissive

and try again. If it works you can disable selinux at /etc/selinux/config and change the line

SELINUX=enforcing

by

 SELINUX=permissive
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top