Hi,

My website at http://www.kabissa.org would really benefit from this module to enable site users to report bugs to our redmine at http://roadmap.kabissa.org.

I tried installing feedmine but it did not work because it requires the redmine and drupal data to be stored in the same mysql databases. Could you add support for multiple databases to be used?

Thanks,

Tobias

CommentFileSizeAuthor
#1 feedmine_abstract_redmine_dbconn.patch3.06 KBjpoesen

Comments

jpoesen’s picture

StatusFileSize
new3.06 KB

Patch provided.

Approach:
- eliminate the need for both drupal and redmine to use the same credentials / database
- simply add a database connection string to settings.php for redmine

In settings.php add:

  $db_url['redmine'] = 'mysqli://redminedbuser:redminedbpass@localhost/redminedbname';

Note:
could use some extra checks to make sure the new connection string is present and properly formatted.

jpoesen’s picture

Status: Active » Needs review
guysaban’s picture

Hi,

Thanks for this patch.

I tried it but got a white screen after applying the patch. Seems that it fails after
function feedmine_settings_form() to set the $redmine_database variable.

I setup the settings.php file as follows:
$db_url['default'] = 'mysql://drupal_db_username:drupal_user_password@localhost/drupal_db';
$db_url['redmine'] = 'mysqli://redmine_db_username:redmine_user_password@localhost/redmine_db';

I checked the DB connection variables, they are found correctly by the patch code.

I would be happy to look further at the issue if you can give me some pointers.

All the best,
Guy

Crom’s picture

Hi,

With reference to your problem Guysaban...and anyone else who is searching:

This error is most likely caused by you trying to use mysql and mysqli drivers in your settings.php file.

If you look in your php logs you will probably see the error: PHP Fatal error: Cannot redeclare db_status_report()

The fix:

if you change the lines of code in your settings.php file as follows (ie remove the i from the mysql in the second line) you should be good to go:

$db_url['default'] = 'mysql://drupal_db_username:drupal_user_password@localhost/drupal_db';
$db_url['redmine'] = 'mysql://redmine_db_username:redmine_user_password@localhost/redmine_db';

Nice patch jpoesen.

Cheers,
Crom

robin van emden’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed and tested. Worked out of the box. Thank you for the patch, jpoesen.

christefano’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Feedmine is now under new maintainership. This version has been discontinued and a new branch is being prepped for Drupal.org. Thanks!