colinmollenhour / mongodb-php-odm

A simple but powerful set of wrappers for using MongoDb in PHP (also a Kohana 3 module)
BSD 3-Clause "New" or "Revised" License
208 stars 50 forks source link

Remote MongoDB Configuration #5

Closed sebicas closed 13 years ago

sebicas commented 13 years ago

Great work on the MongoDB Module!! It's way superior that Mango! Thanks!

Just one sugestion:

I been trying all day to configure the module to work with a remote MongoHQ instance, but I couldn't do it. And have to leave it running in localhost

I would be nice if the in the provided config file you could also include:

Since I tried with:

return array( 'mongotest' => array( 'database' => 'db', 'server' => 'localhost', 'username' => 'myusername', 'password' => 'mypassword', 'profiling' => FALSE ) );

And it didn't work... so if we can have a template it would be great...

I am new with Mongo, so please apologies if my issue is kind of silly!

Thanks,

@sebicas

colinmollenhour commented 13 years ago

Clarify configuration options in sample config.php. Closed by 3990a95dc903f668640e1c230460e53830517a7e

sebicas commented 13 years ago

Thank you for the clarification... what about username & password?

colinmollenhour commented 13 years ago

As per official docs (php.net/mongo), either $options['username'] or 'mongo://user:pasword@hostname:port'