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

Error while initializing phpunit when php-memcached is not installed

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Steps to reproduce:

      1. Set following in your config.php

        define('TEST_CACHE_USING_APPLICATION_STORE', 'memcached');
        define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211'."\n".'127.0.0.1:11212');
        

      2. Start memched server, if not running on localhost
      3. Ensure memcached instance is not installed. php -m | grep memcached
      4. Try initialize phpunit or run and it should work without problem. (Ensure you get notified that alternative cache store is being used.)
      5. Install php-memcached extension and try installing and running phpunit. It should work as expected.
      Show
      Steps to reproduce: Set following in your config.php define('TEST_CACHE_USING_APPLICATION_STORE', 'memcached'); define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211'."\n".'127.0.0.1:11212'); Start memched server, if not running on localhost Ensure memcached instance is not installed. php -m | grep memcached Try initialize phpunit or run and it should work without problem. (Ensure you get notified that alternative cache store is being used.) Install php-memcached extension and try installing and running phpunit. It should work as expected.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:
      wip-mdl-56347

      Description

      Steps to reproduce:

      1. Set following in your config.php

        define('TEST_CACHE_USING_APPLICATION_STORE', 'memcached');
        define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211'."\n".'127.0.0.1:11212');
        

      2. Ensure memcached instance is not installed. php -m | grep memcached
      3. Try initialize phpunit or run and you will observe following notice.

      Notice: Undefined index: class in /home/rajesh/moodles/im31/moodle/cache/classes/factory.php on line 279
      PHP Fatal error:  Class name must be a valid object or a string in /home/rajesh/moodles/im31/moodle/cache/classes/factory.php on line 280
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Nov/16