skip to Main Content

Recently I have migrated one of my projects (PHP 7.4/Lumen/Ubuntu 20.04) from MongoDB to MongoDB compatible AWS DocumentDB. Since the migration all the CLI Scripts are triggering this strange notice/warning

bson_append_array(): invalid array detected. first element of array parameter is not "0".

enter image description here

Everything seems to be functionally working apart from this message (Even though I have all the PHP errors hidden from ini file this still shows up). Not really sure what is going on.

Message is actually coming from "find" method. I also did try to suppress the msg but no luck.

Does anyone have any idea what is going on here ? Appreciate and thanks for all your responses in advance.

  • DocumentDB version 4.0
  • PHP SDK Composer version 1.9.0

2

Answers


  1. Chosen as BEST ANSWER

    I am answering my own questions based on my findings so far.

    Seems like there is no solution for this issue since AWS DocumentDB is not 100% compatible with MongoDB (As per mongoDb documentation over 66% of all of the correctness tests have failed for DocumentDB). Also it is extremely difficult get AWS support for these sort of incompatibility issues, they always refer you to public user forum.

    MongoDB recently put up a blog post summering incompatibility issues with DocumentDB and it makes a lot of sense. You can read it in detail here - https://www.mongodb.com/atlas-vs-amazon-documentdb/compatibility

    My recommendation is if you are considering using documentDB as a replacement of Mongo do not bother. Save your precious time by sticking with MongoDB.


  2. If you add &authMechanism=SCRAM-SHA-1 to the connexion string, the warning disepear.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search