View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0012248||mantisbt||db postgresql||public||2010-08-11 13:38||2014-12-08 00:34|
|Target Version||1.3.0-beta.1||Fixed in Version||1.3.0-beta.1|
|Summary||0012248: Problem updating from 1.1.8 to 1.2.0|
(Using PostgreSQL 8.4.4, PHP 5.2.12, on FreeBSD 8.0)
Attempting to upgrade a current 1.1.8 installation to 1.2.0, when is comes to Database upgrade, we set the Mantis DB details (username and pasword). After clicking the 'upgrade' button we get the following page content:
Looking at the PostgreSQL log, it seems that the upgrading process is attempting to connect to 'template1' database:
Jul 10 08:19:30 postgres: [2-1] LOG: received connection: host=127.0.0.1 port=55536
As far as 'Setting Database Name', 'Setting Admin Username' and 'Setting Admin Password' are all found GOOD, the fault doesn't make sense. It seems there is no reason to attempt to connect with the 'template1' database, for which the Mantis DB owner doesn't have privileges.
|Steps To Reproduce|
Just following the steps above.
|Tags||No tags attached.|
You mention upgrading to 1.2.0, but that is not the latest version, and I believe there were a few fixes to the upgrade system in 1.2.1 and 1.2.2. Can you please try upgrading directly to 1.2.2 and see if that solves the issue?
Thanks for your quick answer!
Before sending the report I reviewed the change logs for 1.2.1 and 1.2.2, looking for a possible fix to that issue. Anyway I have just now attemped the upgrade using a fresh 1.2.2 download, and the problem persists. I keep getting the same red warning:
Attempting to connect to database as admin BAD
The PostgreSQL log shows the same error as well (the Mantis DB owner is trying to connect to 'template1' database.)
Could you paste the portion of your config_inc.php here that involves the database connection? Thanks
--- Database Configuration ---
$g_hostname = 'localhost';
This same DB configuration is running fine in 1.1.8
Hi, any new about this issue? As far as I can see, the problem is clear:
The admin/install.php script (lines 285 and later) ALWAYS try to do a first connection attempt without specifying a database name. In PostgreSQL this means it will attempt to connect to "template1" database, for which the username defined for the Mantis database has no permissions, resulting in the known error.
I don't fully understand the reason to do two connections, given that the second one would catch any errors. If you want to be able to create the database, it would suffit changing the logic the other way around:
Try connect to the specified database with the normal user and password.
Actually, modifying that code to skip the first connection (just for testing) I'm able to go ahead without the known "Attempting to connect to database as admin BAD" error.
However, beyond that point I'm now stumped again with a new "APPLICATION ERROR 0000401" Database query failed. Error received from database was #-1: ERROR: invalid input syntax for integer: «» for the query: UPDATE mantis_bug_table SET category_id=? WHERE project_id=? AND category=?.
As far as I can remember this is an old known one... Should I open a new ticket for it?
BTW, as far as this issue is blocking the upgrade, should we raise the category of this ticket up to "block"?
I am having the same issue when trying to upgrade from 1.2.8 to 1.2.11 (PostgreSQL 8.4.4, PHP 5.3.2, RHEL 6.0), patching the install.php to include '$f_database_name' in the first call to $g_db->Connect resolved the issue for me.
Unassigned from jreese as he is no longer actively developing.
This should be fixed in master branch; if you are able to reproduce the behavior using a nightly build, feel free to reopen the issue.
|2010-08-11 13:38||nomikon||New Issue|
|2010-08-11 13:48||jreese||Note Added: 0026270|
|2010-08-11 13:48||jreese||Assigned To||=> jreese|
|2010-08-11 13:48||jreese||Status||new => feedback|
|2010-08-11 15:00||nomikon||Note Added: 0026272|
|2010-08-11 15:00||nomikon||Status||feedback => assigned|
|2010-08-11 15:18||jreese||Note Added: 0026274|
|2010-08-11 15:18||jreese||Status||assigned => feedback|
|2010-08-11 18:46||nomikon||Note Added: 0026291|
|2010-08-11 18:46||nomikon||Status||feedback => assigned|
|2010-08-26 14:09||nomikon||Note Added: 0026477|
|2010-08-26 14:15||nomikon||Note Added: 0026478|
|2012-10-05 07:08||Sander Niemeijer||Note Added: 0033045|
|2012-10-16 09:03||dregad||Status||assigned => confirmed|
|2012-10-16 09:04||dregad||Assigned To||jreese =>|
|2012-10-16 09:17||dregad||Note Added: 0033227|
|2013-07-30 06:46||dregad||Relationship added||has duplicate 0011573|
|2013-07-30 06:51||dregad||Relationship added||child of 0014398|
|2013-08-16 04:38||hero2289||Tag Attached: closed|
|2013-08-16 06:33||atrol||Tag Detached: closed|
|2014-02-24 15:26||dregad||Note Added: 0039514|
|2014-02-24 15:26||dregad||Status||confirmed => resolved|
|2014-02-24 15:26||dregad||Fixed in Version||=> 1.3.0-beta.1|
|2014-02-24 15:26||dregad||Resolution||open => fixed|
|2014-02-24 15:26||dregad||Assigned To||=> dregad|
|2014-02-24 15:26||dregad||Product Version||=> 1.1.8|
|2014-02-24 15:26||dregad||Target Version||=> 1.3.0-beta.1|
|2014-12-08 00:34||vboctor||Status||resolved => closed|