FAQ
Hello,

my MongoDB is up and running - i can insert and query with other
scripts except of this one.
I dont see why... please help.


//Connecting to MongoDB
$verbindung_mongo = new Mongo('192.168.1.223');

//Set DB
$verbindungmg_daria = $verbindung_mongo->dariatest;

//Set Collection
$dariadoks = $verbindungmg_daria->dokumente;

//Do a simple findOne
$erg=$dariadoks->findOne(array('_id' => new
Mongo('4fc4d1baa9b395581100077f')));


Results in:
Uncaught exception 'MongoConnectionException' with message 'connecting
to 4fc4d1baa9b395581100077f failed: couldn't get host info for
4fc4d1baa9b395581100077f'



MongoDB Version is 2.05

PHP Driver:
mongo
MongoDB Support enabled
Version 1.1.4

Directive Local Value Master Value
mongo.allow_empty_keys 0 0
mongo.allow_persistent 1 1
mongo.auto_reconnect 1 1
mongo.chunk_size 262144 262144
mongo.cmd $ $
mongo.default_host localhost localhost
mongo.default_port 27017 27017
mongo.long_as_object 0 0
mongo.native_long 0 0
mongo.no_id 0 0
mongo.utf8 1 1

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user+unsubscribe@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Search Discussions

  • KingCanadian at Jun 8, 2012 at 9:40 am
    Damn it!
    aaaaaaaah

    Spent hours of googeling because of a typing error

    It has to be MongoId instead of Mongo - damn!

    $erg=$dariadoks->findOne(array('_id' => new
    MongoId('4fc4d1baa9b395581100077f')));

    Solved!

    On 8 Jun., 10:55, KingCanadian wrote:
    Hello,

    my MongoDB is up and running - i can insert and query with other
    scripts except of this one.
    I dont see why... please help.

    //Connecting to MongoDB
    $verbindung_mongo = new Mongo('192.168.1.223');

    //Set DB
    $verbindungmg_daria = $verbindung_mongo->dariatest;

    //Set Collection
    $dariadoks = $verbindungmg_daria->dokumente;

    //Do a simple findOne
    $erg=$dariadoks->findOne(array('_id' => new
    Mongo('4fc4d1baa9b395581100077f')));

    Results in:
    Uncaught exception 'MongoConnectionException' with message 'connecting
    to 4fc4d1baa9b395581100077f failed: couldn't get host info for
    4fc4d1baa9b395581100077f'

    MongoDB Version is 2.05

    PHP Driver:
    mongo
    MongoDB Support enabled
    Version  1.1.4

    Directive Local Value Master Value
    mongo.allow_empty_keys 0 0
    mongo.allow_persistent 1 1
    mongo.auto_reconnect 1 1
    mongo.chunk_size 262144 262144
    mongo.cmd $ $
    mongo.default_host localhost localhost
    mongo.default_port 27017 27017
    mongo.long_as_object 0 0
    mongo.native_long 0 0
    mongo.no_id 0 0
    mongo.utf8 1 1
    --
    You received this message because you are subscribed to the Google
    Groups "mongodb-user" group.
    To post to this group, send email to mongodb-user@googlegroups.com
    To unsubscribe from this group, send email to
    mongodb-user+unsubscribe@googlegroups.com
    See also the IRC channel -- freenode.net#mongodb

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmongodb-user @
categoriesmongodb
postedJun 8, '12 at 8:55a
activeJun 8, '12 at 9:40a
posts2
users1
websitemongodb.org
irc#mongodb

1 user in discussion

KingCanadian: 2 posts

People

Translate

site design / logo © 2022 Grokbase