Page 1 of 1

Problem with upgrade

Posted: 16 Jan 2020, 15:05
by klax
Hello, I have a problem updating mantis from version 2.2.0 to current 2.23.0. I did all the steps in accordance with the upgrade procedure, but when I run the install.php script I have a problem connecting to the database (psql). Authorized user has full rights to the database. I am asking for help what can cause this problem.

-Attempting to connect to database as admin BAD
Does administrative user have access to the database? ( Database connection failed )
-Checking Database Server Version POSSIBLE PROBLEM
Unable to determine 'pgsql' version. ().


The other fields are verified correctly and I receive the information GOOD.

Best regards

Re: Problem with upgrade

Posted: 17 Jan 2020, 08:12
by atrol
There is at least one problem in 2.30.0 installer, that will be fixed in 2.30.1 https://mantisbt.org/bugs/view.php?id=26596

I don't use psql and don't have time to have a deeper look, so I don't know if this bug is causing your problem.

You could try a nightly build to check if the problem is fixed in latest code https://www.mantisbt.org/builds.php

In case it's not fixed, open a bug report on https://www.mantisbt.org/bugs

Re: Problem with upgrade

Posted: 17 Jan 2020, 09:12
by klax
Unfortunately, with version 2.24.0 is exactly the same situation. So I reported this problem to the "bugs" section. Thank you for your help.

Re: Problem with upgrade

Posted: 23 Jan 2020, 12:27
by lampa
Problem is that db_user must have access to template1 db. Check your psql logs.

Change (version 2.23.0 - row 404 in admin/install.php)

$t_result = @$g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password);
to
$t_result = @$g_db->Connect( $f_hostname, $f_db_username, $f_db_password, $f_database_name );

and should be working - at least for me.

Re: Problem with upgrade

Posted: 17 Apr 2020, 18:26
by ELIOTRASIDA
lampa wrote: 23 Jan 2020, 12:27 Problem is that db_user must have access to template1 db. Check your psql logs.

Change (version 2.23.0 - row 404 in admin/install.php)

$t_result = @$g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password);
to
$t_result = @$g_db->Connect( $f_hostname, $f_db_username, $f_db_password, $f_database_name );

and should be working - at least for me.
I did all the steps in accordance with the upgrade procedure, but when I run the install.php script I have a problem connecting to the database (psql). Authorized user has full rights to the database. I am asking for help what can cause this problem.