Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1527

Errors when readPreference option used in MongoClient when connecting to standalone server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 1.6.14
    • Fix Version/s: None
    • Component/s: pecl-mongo
    • Labels:
      None
    • Environment:
      linux,
      PHP 5.6.30 via fpm,
      nginx version: nginx/1.11.4
      mongo v3.0.15
    • # Replies:
      2
    • Last comment by Customer:
      false

      Description

      Im trying to connect to mongo runned as standalone server, but with option readPreference in MongoClient constructor.

      Sometimes im getting errors, and php die with segfault.
      Anywhere in php code the property slaveOkay is used.

      MongoConnectionException: You can not use both slaveOkay and read-preferences. Please switch to read-preferences.
      Fatal error: Access to undeclared static property: MongoCursor::$slaveOkay

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                2 years, 14 weeks ago
                Date of 1st Reply: