Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:28:14+00:00 2026-06-13T21:28:14+00:00

I’m getting this error when trying to connect to a mongo server: Unable to

  • 0

I’m getting this error when trying to connect to a mongo server:

Unable to find the wrapper "mongodb" - did you forget to enable it when you configured PHP?

The connection string looks like this:

$conn = new Mongo("mongodb://XXXX:XXXX@XXX.member0.mongohq.com:10021/XXX",array("replicaSet" => 'rsname'));

I tried finding out qhat wrappers were available using:

var_dump(stream_get_wrappers());

and got the following:

array
  0 => string 'https' (length=5)
  1 => string 'ftps' (length=4)
  2 => string 'compress.zlib' (length=13)
  3 => string 'compress.bzip2' (length=14)
  4 => string 'php' (length=3)
  5 => string 'file' (length=4)
  6 => string 'glob' (length=4)
  7 => string 'data' (length=4)
  8 => string 'http' (length=4)
  9 => string 'ftp' (length=3)
  10 => string 'phar' (length=4)
  11 => string 'zip' (length=3)
  12 => string 'ssh2.shell' (length=10)
  13 => string 'ssh2.exec' (length=9)
  14 => string 'ssh2.tunnel' (length=11)
  15 => string 'ssh2.scp' (length=8)
  16 => string 'ssh2.sftp' (length=9)

I’ve checked the conf.d folders and they all seem to be in order form what I can see, so i’m not sure what I need to do to allow me to connect using the wrapper, as the example shows in the php docs example.

I’m running nginx / PHP 5.3.5-1ubuntu7.11

Ha anyone delat with this before, or able to offer some guidance? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:28:15+00:00Added an answer on June 13, 2026 at 9:28 pm

    Which version of Mongo php library are you using?
    I made a simple test like this using version 1.2.12:

    <?php
    
    $mongo = new Mongo('mongodb://host1.local:27019,host2.local:27020', array("replicaSet"=>'aaa'));
    
    $hosts = $mongo->getHosts();
    
    var_dump( $hosts );
    ?>
    

    and got absolutely no problem.
    ReplicaSet support through the php driver is available since request PHP-121 which goes back to version 1.0.9

    To be more concrete on answering your question, the mongo php driver does not use a connection wrapper. It has a connection parser. You can find more detailled info in the code itself:
    parser.c

    PS: Your ubuntu version is a bit old! Was released in 10/2007 and reached EOL on the 4/2009.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to render a haml file in a javascript response like so:
This could be a duplicate question, but I have no idea what search terms
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.