Epic Fail on Install

13 views
Skip to first unread message

Glenn Powers

unread,
Feb 25, 2009, 11:02:03 PM2/25/09
to xrms-...@googlegroups.com
If the XRMS installer is unable to connect to the database, it reports:

Installation Complete

All of the tables have been created, and initial data has been populated.

The initial user available is "user1" with a password of "user1". You
should change this as soon as you login. (It can be changed in Users
within the Administration section.)

You may now create sample data
<http://localhost/xrms/install/sample.php> to try out the system, or
login <http://localhost/xrms/login.php> to get started entering your own
data.


Ivaylo Boiadjiev

unread,
Feb 26, 2009, 12:13:36 PM2/26/09
to xrms-...@googlegroups.com
Hi, Glenn!

Did you get a message stating the the installer was unable to connect to the database as well or was the failure completely silent?

I am setting up a completely new test environment for this and could look into this but any pointers would be helpful to narrow down what I should be looking for.  If it is a bug, we should also log it into the Sourceforge Bug Tracker.

Cheers,
Ivaylo

Ivaylo Boiadjiev

unread,
Mar 31, 2009, 12:18:42 PM3/31/09
to xrms-users
The fix...

At line 243 of /xrms/install/install.php, replace the current chunk of
code with the following (between the <snip> tags):

<snip>

// can we make a database connection?
/*
* This test was giving a false negative since get_xrms_dbconnection()
returns
* an ADOdb object and is never null. Modified to check for an actual
ADOdb
* error message instead.
*/
$con = get_xrms_dbconnection();
if ($con->_errorMsg) {
// Oops! We do not have a valid database connection
// Now instruct the user in how to fix this problem
$problem = 'SQL ERROR: '.$con->_errorMsg.'</br></br>';
$problem .= 'We cannot connect to the database. Check the
database ';
$problem .= 'parameters in include/vars.php to make sure they are
correct.';
$problem .= 'Also make sure the database is running and can accept
a connection ';
$problem .= 'from this server. <BR><BR>';
$problem .= 'Then run this installation again.<BR><BR>';

install_fatal_error($problem);
}

</snip>

I hope this helps.

Cheers,
Ivaylo
Reply all
Reply to author
Forward
0 new messages