Moodle
  1. Moodle
  2. MDL-10660

Memcache should be checked for before being used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.9.1
    • Component/s: Unknown
    • Labels:
      None
    • Environment:
      Debian Stable (Etch), PHP5
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      28791

      Description

      I went to performance settings and set cache type to memcache, clicked save, and then all pages came up blank – it turned out that I'd not installed the php5-memcache package. It would be nice if moodle would say "your PHP doesn't have memcache support enabled" and then carry on with caching disabled.

        Issue Links

          Activity

          Hide
          Wen Hao Chuang added a comment -

          I believe this issue also exist in 1.9

          Show
          Wen Hao Chuang added a comment - I believe this issue also exist in 1.9
          Hide
          Martin Dougiamas added a comment -

          Rather than doing it on every page load (which would be expensive) we should at least check this before setting this variable ...

          Show
          Martin Dougiamas added a comment - Rather than doing it on every page load (which would be expensive) we should at least check this before setting this variable ...
          Hide
          Petr Škoda added a comment - - edited

          no, this was already fixed in 1.9 already

          Show
          Petr Škoda added a comment - - edited no, this was already fixed in 1.9 already
          Hide
          Petr Škoda added a comment - - edited

          reverting commits:
          1/ we should not hide admin settings this way - instead we should display info how to install needed extensions
          2/ proper place to fix this is lib/setup.php - which was already done in 1.9

          anyway commits like this should be imho reviewed/approved by somebody who worked on the implementation

          Show
          Petr Škoda added a comment - - edited reverting commits: 1/ we should not hide admin settings this way - instead we should display info how to install needed extensions 2/ proper place to fix this is lib/setup.php - which was already done in 1.9 anyway commits like this should be imho reviewed/approved by somebody who worked on the implementation
          Hide
          Petr Škoda added a comment -

          I think notice about availability of memcache and eAccelerator should be enough in 1.9, this could be implemented in new admin_setting_heading element.

          Show
          Petr Škoda added a comment - I think notice about availability of memcache and eAccelerator should be enough in 1.9, this could be implemented in new admin_setting_heading element.
          Hide
          Petr Škoda added a comment -

          oh - this should not be marked as fixed in 1.8.5, 1.9.1, 1.9.2, 2.0 - only 1.9 is fixed, 1.9.2 and 2.0 are future versions, 1.8.5 is not fixed

          Show
          Petr Škoda added a comment - oh - this should not be marked as fixed in 1.8.5, 1.9.1, 1.9.2, 2.0 - only 1.9 is fixed, 1.9.2 and 2.0 are future versions, 1.8.5 is not fixed
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Reviewed code in setup.php looks ok.

          Note that it's (highly) possible to make this setting to disappear in a next future, if it isn't really necessary any more... (due to all the improvements made in 1.9 there aren't really a lot of repeated queries using the cache). Only the "shared" ones (memcache, eacellerator) could provide some benefit, although we should confirm that.

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Reviewed code in setup.php looks ok. Note that it's (highly) possible to make this setting to disappear in a next future, if it isn't really necessary any more... (due to all the improvements made in 1.9 there aren't really a lot of repeated queries using the cache). Only the "shared" ones (memcache, eacellerator) could provide some benefit, although we should confirm that. Closing, ciao

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: