php连接MongoDB 报错Server does not support sessions
解决步骤:
- 找到mongodb的配置文件,做如下调整
replication:
oplogSizeMB: <int>
replSetName: <string>
enableMajorityReadConcern: <boolean>
- 重启MongoDB的服务后,进入mongo执行
rs.initiate()
- 问题解决。
replication:
oplogSizeMB: <int>
replSetName: <string>
enableMajorityReadConcern: <boolean>
rs.initiate()