View Issue Details

IDProjectCategoryView StatusLast Update
0012675mantisbtupgradepublic2011-04-05 14:23
Reporterdanieln Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.4 
Target Version1.2.5Fixed in Version1.2.5 
Summary0012675: Error while trying to upgrade from 1.2.0 --> 1.2.4 (PostgreSQL)
Description

"Running pgsql version PostgreSQL 8.3.3 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)").

Upon upgrade using admin/install.php we recieved an error:
"Attempting to connect to database as admin BAD"

The problem seemed to be with line 293 in admin/install.php.

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

no DB defined in the ADODB Connect Handler.

acording to ADODB Documentation:
Connect($host,[$user],[$password],[$database]).

Adding the $f_database_name seemed to solve the problem.

Tagspatch

Activities

atrol

atrol

2011-01-11 02:26

developer   ~0027890

Did you fill out the fields for "Admin Username" and "Admin Password" or just "Username" and "Password" ?

danieln

danieln

2011-01-11 03:51

reporter   ~0027891

Last edited: 2011-01-11 03:52

We tried both
-leaving the admin fields blank
and

  • filling out the "Admin Username" and "Admin Password" as well as the the normal fields.

neither worked.

changing line 293 to:
$t_result = @$g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password, $f_database_name );

solved the problem.

denny.reeh

denny.reeh

2011-03-05 16:07

reporter   ~0028378

Last edited: 2011-03-05 16:11

same for me. while upgrade from mantis 1.1.x to 1.2.4 on mysql, the upgrade script was only working with the fix above.

Regards Denny Reeh

dhx

dhx

2011-03-25 11:29

reporter   ~0028483

Thanks Daniel! I've committed your patch.

Related Changesets

MantisBT: master 42b90613

2011-03-25 11:24

danieln

Committer: dhx


Details Diff
Fix 0012675: Upgrade failure due to missing database name in Connect call

PostgreSQL upgrades were failing with the following error message:

"Attempting to connect to database as admin BAD"

This was due to a Connect() call missing an explicit definition of the
database name.

Signed-off-by: David Hicks <d@hx.id.au>
Affected Issues
0012675
mod - admin/install.php Diff File

MantisBT: master-1.2.x d33f80dd

2011-03-25 11:24

danieln

Committer: dhx


Details Diff
Fix 0012675: Upgrade failure due to missing database name in Connect call

PostgreSQL upgrades were failing with the following error message:

"Attempting to connect to database as admin BAD"

This was due to a Connect() call missing an explicit definition of the
database name.

Signed-off-by: David Hicks <d@hx.id.au>
Affected Issues
0012675
mod - admin/install.php Diff File

MantisBT: master a8864b08

2011-04-07 10:30

dhx


Details Diff
Fix 0012675: Do not attempt connection to non-existent database

The original fix for 0012675 was incorrect - the patch was applied to the
wrong line of install.php. We should not be attempting to connect to a
specific database that doesn't exist and needs creating.

The proper solution to 0012675 requires more thought and work because
only certain database backends support connections to database servers
without specifying a database to connect to.
Affected Issues
0012675
mod - admin/install.php Diff File

MantisBT: master-1.2.x 1e1c073b

2011-04-07 10:30

dhx


Details Diff
Fix 0012675: Do not attempt connection to non-existent database

The original fix for 0012675 was incorrect - the patch was applied to the
wrong line of install.php. We should not be attempting to connect to a
specific database that doesn't exist and needs creating.

The proper solution to 0012675 requires more thought and work because
only certain database backends support connections to database servers
without specifying a database to connect to.
Affected Issues
0012675
mod - admin/install.php Diff File