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

Create one enviromental check to recommend PHP >= 5.3.3 on install/upgrade

    Details

    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      While PHP 5.2.8 is the hard (required) min version to run Moodle 2.0, I think it could be interesting to add one new environmental test to be executed on each install / upgrade:

      • Create it as custom and optional check.
      • Make it look for PHP 5.3.3
      • If the test pass, remain hidden.
      • If the test fails, inform about the benefits (memory/speed/security) of using PHP 5.3
      • Make the test available also in 19_STABLE (but apply it only to 2.0 version)

      I think it can be interesting to have that being informed continuously to admins. Differences are huge enough.

      Ciao

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            skodak Petr Skoda added a comment -

            hehe, this is no surprise - all large sites should be using latest PHP 5.3.x
            not sure if all the environment work is worth it

            Show
            skodak Petr Skoda added a comment - hehe, this is no surprise - all large sites should be using latest PHP 5.3.x not sure if all the environment work is worth it
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Hi Eloy,

            I made patches for 1.9 and 2.0 version to address this issue. When you have a chance, could you take the look the patches and leave me some comments.

            M19: https://github.com/rwijaya/moodle/commit/5965ecc82c16962eb322253495be705b1e8ec2ab
            M20: https://github.com/rwijaya/moodle/commit/39f2bbf3fb6b560fa237ef9ab16265967e8cfd33

            Thanks
            Rosie

            Show
            rwijaya Rossiani Wijaya added a comment - Hi Eloy, I made patches for 1.9 and 2.0 version to address this issue. When you have a chance, could you take the look the patches and leave me some comments. M19: https://github.com/rwijaya/moodle/commit/5965ecc82c16962eb322253495be705b1e8ec2ab M20: https://github.com/rwijaya/moodle/commit/39f2bbf3fb6b560fa237ef9ab16265967e8cfd33 Thanks Rosie
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            It looks perfect, if also is working as expected then great!

            The only "but" is that we don't want the test to be executed for 1.9.x at all, we won't it only executed for 2.0.x but from 1.9.x and 2.0.x.

            So you need to add it to the moodle 2.0 section of the XML file only (but in both branches). Right now the M20 change looks ok but the M19 is the one that has the custom test in too many versions (has to be only in the Moodle 2.0.x one).

            Lol, this is crazy, hope you have got it, all those for, from... :-D

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - It looks perfect, if also is working as expected then great! The only "but" is that we don't want the test to be executed for 1.9.x at all, we won't it only executed for 2.0.x but from 1.9.x and 2.0.x. So you need to add it to the moodle 2.0 section of the XML file only (but in both branches). Right now the M20 change looks ok but the M19 is the one that has the custom test in too many versions (has to be only in the Moodle 2.0.x one). Lol, this is crazy, hope you have got it, all those for, from... :-D Ciao
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Thanks Eloy for reviewing the patch.

            Update m19 patch as suggested by Eloy.

            The new patches are available at:
            M19: https://github.com/rwijaya/moodle/commit/059518944a163f8c26ac944096364e70dbea4f64
            M20: https://github.com/rwijaya/moodle/commit/39f2bbf3fb6b560fa237ef9ab16265967e8cfd33

            Rosie

            Show
            rwijaya Rossiani Wijaya added a comment - Thanks Eloy for reviewing the patch. Update m19 patch as suggested by Eloy. The new patches are available at: M19: https://github.com/rwijaya/moodle/commit/059518944a163f8c26ac944096364e70dbea4f64 M20: https://github.com/rwijaya/moodle/commit/39f2bbf3fb6b560fa237ef9ab16265967e8cfd33 Rosie
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Create pull requests:

            M19: PULL-48
            M20: PULL-47

            Show
            rwijaya Rossiani Wijaya added a comment - Create pull requests: M19: PULL-48 M20: PULL-47
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Now it looks nice. Thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Now it looks nice. Thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Just saw this is action in my local site... one side note:

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Just saw this is action in my local site... one side note: We should create http://docs.moodle.org/en/admin/environment/custom_check/php_check_php533 with information about the reasons for recommending PHP >= 5.3.3 Ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Closing as setting fixfor versions. Will land upstream in hours, thanks and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Closing as setting fixfor versions. Will land upstream in hours, thanks and ciao
            Hide
            ashleyholman Ashley Holman added a comment -

            Could someone please provide some information on why 5.3.3 is recommended over 5.2.8?

            If there are good reasons then this will help form a case for system administrators to build / test / support the new version.

            Thanks

            Show
            ashleyholman Ashley Holman added a comment - Could someone please provide some information on why 5.3.3 is recommended over 5.2.8? If there are good reasons then this will help form a case for system administrators to build / test / support the new version. Thanks
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Hi Ashley,

            5.3.3 has better stability, security and memory management compared to 5.2.8.

            Discussion regarding this issue is available at: http://moodle.org/mod/forum/discuss.php?d=166045

            For More info regarding 5.3.3:
            release note: http://php.net/releases/5_3_3.php
            change log: http://www.php.net/ChangeLog-5.php#5.3.3

            Thanks
            Rosie

            Show
            rwijaya Rossiani Wijaya added a comment - Hi Ashley, 5.3.3 has better stability, security and memory management compared to 5.2.8. Discussion regarding this issue is available at: http://moodle.org/mod/forum/discuss.php?d=166045 For More info regarding 5.3.3: release note: http://php.net/releases/5_3_3.php change log: http://www.php.net/ChangeLog-5.php#5.3.3 Thanks Rosie

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11