Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-61304

MongoDB Cache Store incompatible with php7.x (moodle 3.4 requirement)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.4, 3.4.1
    • Caching
    • None
    • MOODLE_34_STABLE

      As per official documentation from Mongo web site (https://docs.mongodb.com/ecosystem/drivers/php/)  the old MongoDB Driver do not work anymore (and in my personal test old PECL does not compile at all) with PHP 7.0.x and newer.

      So the mongodb cache store PHP API requirements are conflicting with php7 Moodle3's requirement.

      I managed to change the moodle code in cache/store/mongodb adding the new PHP MongoDB Framework (1.2) and using the new "basic API" driver for php7 and it seem to work fine.

      My changes are available on https://gitlab.di.unito.it/rabellino/moodle

      I started from a fresh Moodle 3.4.1 install and all the changed files are in the branch "wip-mongodb-update-driver-calls".

      I know that MongoDB it's the slowest one, but actually cannot be used anymore at all, so the choices are: continue to support Mongo adopting the new PHP driver, or drop it.

      I prefer the first one option, so why i'm sharing my code changes.

      Hope this can help someone.

            Unassigned Unassigned
            rabser Sergio Rabellino
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.