No database connection to PostgreSQL 9.6 on FreeBSD 11

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
luksch
Posts: 2
Joined: 01 Jan 2017, 18:45

No database connection to PostgreSQL 9.6 on FreeBSD 11

Post by luksch »

Hi,

as it looks very promising I wanted to give mantis a try and thus I tried to install it on my server running FreeBSD 11. However, I am not capable of establishing a connection between my mantis installation running on PHP 7.0 and my PostgreSQL 9.6 database.

The web interface shows me that the PHP module "pgsql" is installed. Nonetheless, the connection to the already existing, but empty database called "mantis" can not be established. Below you can see screenshots of the datbase configuration and the output of the install tool.

Image
Image

However, I am able to connect to the database using the psql tool, as illustrated in the screenshot below.

Image

I am graceful for any help I receive.

Thanks a lot!
Attachments
psqlWorking.PNG
psqlWorking.PNG (4.68 KiB) Viewed 3336 times
dbConnectionSettings.PNG
dbConnectionSettings.PNG (61.43 KiB) Viewed 3336 times
noDBConnection.PNG
noDBConnection.PNG (52.3 KiB) Viewed 3336 times
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: No database connection to PostgreSQL 9.6 on FreeBSD 11

Post by atrol »

Might be the same issue
https://www.mantisbt.org/issues/view.php?id=22091

You can try if changing line 421 in file admin/install.php
From

Code: Select all

	$t_result = @$g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password );
To

Code: Select all

	$t_result = @$g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password, $f_database_name );
fixes the issue.
Please use Search before posting and read the Manual
luksch
Posts: 2
Joined: 01 Jan 2017, 18:45

Re: No database connection to PostgreSQL 9.6 on FreeBSD 11

Post by luksch »

Thanks a lot. This worked like a charm.
Post Reply