title: PHP MongoClient "No candidate servers found" with replica set
body: <p>Specs: PHP 5.3.10, Ubuntu 12.04 64 bit, Mongo driver 1.5.1, MongoDB 2.4.8</p>
  
  <p>We have a single shard Mongo with two secondary replica sets. I can't seem to get PHP driver to utilize replica sets for high performance reads/writes. I'm getting "No candidate servers found" when trying to connect with the connection string provided below.</p>
  
  <pre><code>$connection = new MongoClient("mongodb://10.88.217.247:27017,10.88.217.247:27018",
                              array('username'=&gt;"{$username}", 'password'=&gt;"{$password}", 'replicaSet' =&gt; true));
  </code></pre>
  
  <p>This is what Mongo log sends:</p>
  
  <pre><code>[Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: start
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] send_packet: read from header: 36
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] send_packet: data_size: 259
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: can't find minWireVersion, defaulting to 0
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: can't find maxWireVersion, defaulting to 0
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: setting maxBsonObjectSize to 16777216
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: setting maxMessageSizeBytes to 48000000
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: can't find maxWriteBatchSize, defaulting to 1000
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: set name: rs-0, ismaster: 1, secondary: 0, is_arbiter: 0
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: the server name (mongo-0-0:27018) did not match with what we thought it'd be (10.88.218.248:27018).
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: the replicaset name is not set, so we're using rs-0.
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] found host: mongo-0-0:27018
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] found host: mongo-0-2:27018
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] found host: mongo-0-1:27018
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] ismaster: last ran at 1398292169
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] discover_topology: ismaster worked, but we need to remove the seed host's connection
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] mongo_connection_destroy: Destroying connection object for 10.88.218.248:27018;-;admin/scal/a6612d715d1a4f9549232ec4d599bf55;12199
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] mongo_connection_destroy: Closing socket for 10.88.218.248:27018;-;admin/scal/a6612d715d1a4f9549232ec4d599bf55;12199.
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] discover_topology: ismaster worked
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] discover_topology: found new host: mongo-0-0:27018
  [Wed Apr 23 22:29:29 2014] [error] [client 170.171.2.122] connection_create: creating new connection for mongo-0-0:27018
  </code></pre>
  
  <p>rs.status() JSON:</p>
  
  <pre><code> {
  "set" : "rs-0",
  "date" : ISODate("2014-04-24T15:13:39.000Z"),
  "myState" : 1,
  "members" : [ 
      {
          "_id" : 0,
          "name" : "mongo-0-0:27018",
          "health" : 1,
          "state" : 1,
          "stateStr" : "PRIMARY",
          "uptime" : 68415,
          "optime" : Timestamp(1398285029, 1),
          "optimeDate" : ISODate("2014-04-23T20:30:29.000Z"),
          "self" : true
      }, 
      {
          "_id" : 1,
          "name" : "mongo-0-1:27018",
          "health" : 1,
          "state" : 2,
          "stateStr" : "SECONDARY",
          "uptime" : 67984,
          "optime" : Timestamp(1398285029, 1),
          "optimeDate" : ISODate("2014-04-23T20:30:29.000Z"),
          "lastHeartbeat" : ISODate("2014-04-24T15:13:38.000Z"),
          "lastHeartbeatRecv" : ISODate("2014-04-24T15:13:38.000Z"),
          "pingMs" : 0,
          "syncingTo" : "mongo-0-0:27018"
      }, 
      {
          "_id" : 3,
          "name" : "mongo-0-2:27018",
          "health" : 1,
          "state" : 2,
          "stateStr" : "SECONDARY",
          "uptime" : 63419,
          "optime" : Timestamp(1398285029, 1),
          "optimeDate" : ISODate("2014-04-23T20:30:29.000Z"),
          "lastHeartbeat" : ISODate("2014-04-24T15:13:38.000Z"),
          "lastHeartbeatRecv" : ISODate("2014-04-24T15:13:38.000Z"),
          "pingMs" : 0,
          "syncingTo" : "mongo-0-0:27018"
      }
  ],
  "ok" : 1
  </code></pre>
  
  <p>}</p>