I just tested new 7.x-1.0-rc1 and noticed that it has made having connection_options in configuration mandatory.
README.txt gives an example and says that connection_options might be used. Out of this I got the impression that they are not mandatory. So I have used configuration like:
$conf['mongodb_connections'] = array(
'default' => array('host' => 'localhost', 'db' => 'sitename'),
);
After installing the rc1 I got fatal error "unsupported operand types" from mongodb/mongodb.module line 30. The system is trying to have union with non-existing connection_options.
Comments
Comment #1
jiivonen commentedpatch
Comment #2
firebird commentedComment #4
chx commentedThere's code for default but only for default, sorry.
Comment #5
chx commentedComment #7
chx commentedComment #8
jiivonen commentedThe solution in #4 looks nice and works well. Thanks.
Comment #9
saltednutI too was getting the error- and unable to get $conf['mongodb_connections'] to work from settings.php until I patched using #4 - it now is using the database I defined in settings.php - thank you, chx.
Comment #11
marsdk commentedEventhough this is closed #4 also worked for me.
Comment #12
fgmThis patch and its parent commit which introduced options to the connection constructor need backport to D6.
Comment #13
Anonymous (not verified) commentedI just looked over and tested the D6 code and I also looked at the usage statistics. From what I can tell almost nobody is using or will be using this module on D6. I would mark this as works as designed and be done with it. I would also suggest reviewing all D6 tickets to see if they are relevant for D7/D8 and if not just close them as works as designed or won't fix. Do you agree?
The support for connection info was added in this commit. The backport will also need to include this fix #1891508: Specify a database to authenticate with.
Comment #14
slashrsm commentedI agree about reviewing D6 tickets and closing them where appropriate.