You’ve asked the same question just a day ago (Need help with Mongo Client Connections and PHP 5.6). There’s no need to ask the same question multiple times - we’ll reply when we get to it.
In your case, you are using the legacy MongoDB extension, which is no longer supported. If you are using PHP 5.6, there are older (now also unsupported) versions of the new driver available that also run on PHP 5.6. Please upgrade and see if that resolves your problem. Thanks!