Fixed PHP-535: Run commands on Replication Secondaries
Merge Pull Request #331 into 'next'

* pr/331:
  Fixed PHP-535: Run commands on Replication Secondaries