I am attempting to use the rowing club boat booking system at https://github.com/erikroos/BIS, but have reached the end of my talent.
Logging into my installed system appears to be the problem. As I understand the problem, out of the ‘box’ it is set up to borrow the user login details from a Drupal database on the original creator’s server.
Obviously, that won’t work for me.
I suspect the changes must be made in:
function ValidateLogin($user, $pass, $database_host, $login_database_user, $login_database_pass, $login_database) {
// Drupal-DB selecteren
$link_drupal = mysql_connect($database_host, $login_database_user, $login_database_pass);
if (!mysql_select_db($login_database, $link_drupal)) {
echo mysql_error()."
";
}
$query = "SELECT pass FROM users WHERE name='" . $user . "';";
$result = mysql_query($query);
if (!$result) {
echo mysql_error()."
";
}
$row = mysql_fetch_assoc($result);
$pass_db = $row['pass'];
mysql_close($link_drupal);
$pass_given = md5($pass);
if ($pass_db == $pass_given) {
return true;
}
return false;
}
Attempting to login produces these errors: (all the line refs are within the above snippet)
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'whatl675_boat'@'localhost' (using password: YES) in /home/whatl675/public_html/boats/include_helperMethods.php on line 95 Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/whatl675/public_html/boats/include_helperMethods.php on line 96 Access denied for user 'whatl675_boat'@'localhost' (using password: YES) Warning: mysql_query() [function.mysql-query]: Access denied for user 'root'@'localhost' (using password: NO) in /home/whatl675/public_html/boats/include_helperMethods.php on line 101 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/whatl675/public_html/boats/include_helperMethods.php on line 101 Access denied for user 'root'@'localhost' (using password: NO) Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/whatl675/public_html/boats/include_helperMethods.php on line 105 Warning: mysql_close() expects parameter 1 to be resource, boolean given in /home/whatl675/public_html/boats/include_helperMethods.php on line 107
So what I need it to do is point instead to a table in the main database (which we can call ‘boat’ with the table ‘users’).
Thanks for reading this far (and please don’t feel obliged to help),
WK
(Oh, almost forgot, it’s conveniently entirely written in Dutch.)
It looks to me that all you need to do is create a MySQL database with all the tables and columns that the application requires and edit the config variables ($database_host, $login_database_user, $login_database_pass). At that point you could change $link_drupal to say something less misleading like $link_mysql and debug from there.
It doesn’t look too complicated after you get to that point by just looking at the errors.
Do all of that and post the results (remaining errors).
Do you know all of the fields/values that the database is going to require?
Let me know if I am way off track.