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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.4, 3.4.1
    • Fix Version/s: None
    • Component/s: Caching
    • Labels:
      None
    • Affected Branches:
      MOODLE_34_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rabser Sergio Rabellino
                Participants:
                Component watchers:
                Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: