FAQ
Hi,

i used the following php code to connect with MongoDB.

*$m = new MongoClient("mongodb://localhost:27017")*;

But i am getting this following error.

*Fatal error: Uncaught exception 'MongoConnectionException' with message
'Failed to connect to: 127.0.0.1:27017: Unknown error'
*
*MongoConnectionException: Failed to connect to: 127.0.0.1:27017: *
*
*
i don't know how to resolve this. i tried lot of connection string
possibilities that are given in various blogs. but nothing helped. Any help
here?

Thanks,
Sathyamoorthi.

--
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

  • Derick Rethans at Jan 8, 2013 at 1:36 pm

    On Tue, 8 Jan 2013, Sathyamoorthi P wrote:

    i used the following php code to connect with MongoDB.

    *$m = new MongoClient("mongodb://localhost:27017")*;

    But i am getting this following error.

    *Fatal error: Uncaught exception 'MongoConnectionException' with message
    'Failed to connect to: 127.0.0.1:27017: Unknown error'
    *
    *MongoConnectionException: Failed to connect to: 127.0.0.1:27017: *
    *
    *
    i don't know how to resolve this. i tried lot of connection string
    possibilities that are given in various blogs. but nothing helped. Any help
    here?
    A few questions:

    - can you connect to MongoDB with the "mongo" shell command?
    - do you have any firewall running?
    - which OS is this?

    cheers,
    Derick
    --
    {
    website: [ "http://mongodb.org", "http://derickrethans.nl" ],
    twitter: [ "@derickr", "@mongodb" ]
    }

    --
    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
postedJan 8, '13 at 1:07p
activeJan 8, '13 at 1:36p
posts2
users2
websitemongodb.org
irc#mongodb

2 users in discussion

Derick Rethans: 1 post Sathyamoorthi P: 1 post

People

Translate

site design / logo © 2022 Grokbase