欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

I'm trying to configure memcache module and failed to load dmemcache.inc

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

shareimprove this question
 
1 
What modifications did you make to settings.php to get this working? – cilefen Feb 14 at 16:48
   
I did nothing... – Jean-Francois Feb 14 at 16:48
   
cilefen, you are a master. :) I found it. – Jean-Francois Feb 14 at 16:52

1 Answer 正确答案

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'];
shareimprove this answer

来自  http://drupal.stackexchange.com/questions/190374/im-trying-to-configure-memcache-module-and-failed-to-load-dmemcache-inc

普通分类: