4

Anybody could have an Idea why I get this error Failed to load required file sites/all/modules/memcache/dmemcache.inc.

I installed memcache properly on my server, but when I go to drupal Report, I got the above message

I'm using drupal 7

This is from my PHPInfo()
memcached
memcached support   enabled
Version     2.1.0
libmemcached version    1.0.8
Session support     yes
igbinary support    no
json support    no

Directive   Local Value Master Value
memcached.compression_factor    1.3 1.3
memcached.compression_threshold 2000    2000
memcached.compression_type  fastlz  fastlz
memcached.serializer    php php
memcached.sess_binary   0   0
memcached.sess_lock_wait    150000  150000
memcached.sess_locking  1   1
memcached.sess_prefix   memc.sess.key.  

**** UPDATE **** in order to make it work, I added that to the settings file

$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
  $conf['lock_inc'] = 'sites/all/modules/memcache/memcache-lock.inc';
  $conf['memcache_stampede_protection'] = TRUE;
  $conf['cache_default_class'] = 'MemCacheDrupal';

  // The 'cache_form' bin must be assigned to non-volatile storage.
  $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';

  // Don't bootstrap the database when serving pages from the cache.
  $conf['page_cache_without_database'] = TRUE;
  $conf['page_cache_invoke_hooks'] = FALSE;

thanks a lot

0

2 Answers 2

7

Modifications to settings.php are required. Read the docs on how to configure it. Here is an example configuration I use with two memcached servers:

$conf['memcache_key_prefix'] = __FILE__;
$conf['cache_backends'][] = 'sites/all/modules/contrib/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['lock_inc'] = 'sites/all/modules/contrib/memcache/memcache-lock.inc';
$conf['memcache_stampede_protection'] = TRUE;
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
$conf['page_cache_without_database'] = TRUE;
$conf['page_cache_invoke_hooks'] = FALSE;
$conf['memcache_servers'] = ['172.16.12.51:11211' => 'default', '172.16.12.52:11211' => 'default'];
0
0

In my case there was a problem with the domain module which required to include in settings.php line:

include_once DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';

As it is internally calling drupal_bootstrap() then every change of $conf after that line is ignored. Solution was to define $conf variables before the mentioned line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.