質問

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