Hello,

Whenever I try to enable the memcache admin module, I get this error:

Memcache admin requires that the "cache_inc" $conf variable be set to include either memcache.inc or memcache.db.inc. Please read the installation instructions. (Currently using Memcache admin Memcache not included)

Here's my $conf section of my settings.php file:

$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';
'memcache_servers' => array('localhost:11211' => 'default',
'localhost:11212' => 'default',
'localhost:11213' => 'default',
'localhost:11214' => 'pages',
'localhost:11215' => 'filer',
'localhost:11216' => 'menu'),
'memcache_bins' => array('cache' => 'default',
'cache_filter' => 'filer',
'cache_menu' => 'menu');

Any help would be greatly appreciated!

CommentFileSizeAuthor
#18 memcache_requirements_fix.patch1.96 KBmsonnabaum

Comments

drupalmind’s picture

subscribing same on fedora plateform
thx

sivaji_ganesh_jojodae’s picture

This should fix.

$conf = array(
  'cache_inc' => './sites/all/modules/memcache/memcache.inc', 
  'memcache_servers' => array('localhost:11211' => 'default',
    'localhost:11212' => 'default',
    'localhost:11213' => 'default',
    'localhost:11214' => 'pages',
    'localhost:11215' => 'filer',
    'localhost:11216' => 'menu'
  ),
  'memcache_bins' => array('cache' => 'default',
    'cache_filter' => 'filer',
    'cache_menu' => 'menu'
  ),
);
crea’s picture

Is there a reason why you have 3 servers for default bin instead of one big server ? Just curious.

jeremy’s picture

Status: Active » Fixed

No further feedback, closing.

dwkitchen’s picture

Status: Fixed » Active

I have the same problem here is my settings.php details


/**
 * Memcache
 */

$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';

$conf = array(
   'memcache_servers' => array('localhost:11211' => 'default', 'localhost:11212' => 'radioactivity', 'localhost:11213' =>  'pages'),
   'memcache_bins' => array('cache' => 'default', 'radioactivity' => 'radioactivity', 'cache_page' => 'pages'),
);
AgaPe’s picture

DavidPlanesTV -> with the first thing you set $conf['cache_inc'] and with the second you clear it, override...

jeremy’s picture

Status: Active » Fixed

Fix explained above, closing.

blue92877’s picture

Status: Fixed » Active

I'm having the same issue, but I can't see where my code is different from what the above fix suggests. Here is my code.

$conf = array(
  'cache_inc' => './sites/all/modules/memcache/memcache.db.inc',
  'memcache_servers' => array(
    'localhost:11211' => 'default',
    'localhost:11212' => 'block',
    'localhost:11213' => 'content',
    'localhost:11214' => 'filter',
    'localhost:11215' => 'form',
    'localhost:11216' => 'menu',
    'localhost:11217' => 'page',
    'localhost:11218' => 'views',
  ),
  'memcache_bins' => array(
    'cache' => 'default',
    'cache_block' => 'block',
    'cache_content' => 'content',
    'cache_filter' => 'filter',
    'cache_form' => 'form',
    'cache_menu' => 'menu',
    'cache_page' => 'page',
    'cache_views' => 'views',
  ),
);

The error happens when I try to enable memcace admin. Here is the error verbatim

Memcache admin requires that the "cache_inc" $conf variable be set to include either memcache.inc or memcache.db.inc. Please read the installation instructions. (Currently using Memcache admin Memcache not included)

Thanks for your help,

blue

akademi’s picture

I have the same issue. And I can struggled hard but failed again and again. Here is my $conf:

$conf = array(
  'cache_inc' => '/var/www/vhosts/xxx.de/httpdocs/modules/memcache/memcache.inc',
'memcache_key_prefix' => 'akademiker_nw',
 
);

Nobody can help on this. Has anybody succeed with installation???? I use version 6.1.5 but it is the same issue

On the fedora platform I read everythin twice. It is not working Only thing what means moving the include files????

akademi’s picture

Nobody can help on this????

robertdouglass’s picture

have you tried with a 'cache_inc' value relative to the drupal install? like, './sites/all/modules/memcache/memcache.inc' ?

robertdouglass’s picture

Status: Active » Postponed (maintainer needs more info)
longwave’s picture

The only way I can reproduce this is by defining $conf twice in settings.php, where the second definition overwrites the first. Setting $conf['cache_inc'] to a non-existent file or other nonsense value results in a screen full of errors when browsing any page.

robertdouglass’s picture

Status: Postponed (maintainer needs more info) » Fixed

@longwave thanks. I think this can be closed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nvl.sateesh’s picture

Sorry to open it again...

However, I have downloaded both the latest version as well as the latest dev version. With both, i get the same error :

Memcache admin requires that the "cache_inc" $conf variable be set to include either memcache.inc or memcache.db.inc. Please read the installation instructions. (Currently using Memcache admin Memcache not included)

I tried to debug and found out that the dmemcache.inc file is not getting loaded. Here is the config in my settings.php file:

$conf['cache_inc'] = '/var/www/vhosts/domain.in/httpdocs/sites/all/modules/memcache/memcache.db.inc';

$conf['memcache_servers'] = array(
	'localhost:11211' =>	'apachesolr',
	'localhost:11212' =>	'default',
	'localhost:11213' =>	'block',
	'localhost:11214' =>	'content',
	'localhost:11215' =>	'form',
	'localhost:11216' =>	'menu',
	'localhost:11217' =>	'page',
	'localhost:11218' =>	'views',
	'localhost:11219' =>	'views_data',
	'localhost:11223' =>	'filter',
  );

$conf['memcache_bins'] = array(
    'cache' => 'default',
    'cache_block' => 'block',
    'cache_content' => 'content',
    'cache_filter' => 'filter',
    'cache_form' => 'form',
    'cache_menu' => 'menu',
    'cache_page' => 'page',
    'cache_views' => 'views',
	'cache_views_data' => 'views_data',
	'cache_apachesolr' => 'apachesolr',
  );

I am using Domain Access module which uses a custom_url_rewrite_outbound(&$path, &$options, $original_path);

It also includes its own settings.inc file. But i did not see any conflict with the $conf variable. Can anyone help with this.

I tried the following solution:

I hard coded:

  require('/var/www/vhosts/domain.in/httpdocs/sites/all/modules/memcache/dmemcache.inc');

in the memcache_admin.module file so that it loads the stats function. It works; however when i clear the cache tables, and load pages, the cache tables are loaded again..... it shows 0% hits under mem_used.

this is critical .. any help is greatly appreciated...

nvl.sateesh’s picture

Status: Closed (fixed) » Active

changed the status... as it is still causing issues. perhaps more documentation will help..

thanks...

msonnabaum’s picture

StatusFileSize
new1.96 KB

Wrapping the requirements hook in `if ($phase == 'runtime')` resolves the issue for me.

Patch attached.

moshe weitzman’s picture

Component: Miscellaneous » Code
Category: support » bug
Status: Active » Reviewed & tested by the community

Thats the best fix i can think of. We can't reliably check for anything during install since memcache and variables might not be setup.

gofair’s picture

I followed the installation instructions (I think by the letter) and am getting the same error:

Memcache admin requires that the "cache_inc" $conf variable be set to include either memcache.inc or memcache.db.inc. Please read the installation instructions. (Currently using Memcache admin Memcache not included)

If anyone can help, these were the steps I took:
https://docs.google.com/document/d/1Vy7ZXxJuKsDqTsYDDE-DyuNTwK4QsynBOk-a...

Setup:
CentOS 5.5 on EC2
PHP 5.2.10 with Xcache
Using Pressflow 6.19.96
and MemCached 1.4.5-1.el5

Does anyone know if having MySQL on a separate (dedicated) DB server poses any issues to MemCached?
Thanks.

freephile’s picture

Works in a mercury stack installer however on another instance I could not enable the memcache admin module until I specifically required dmemcache.inc from settings.php
require_once ('sites/all/modules/contrib/memcache/dmemcache.inc');

This must be because the stack installer plays with the PHP include path, and in memcache.inc the simple include(); works whereas in other instances it silently fails. I'd suggest changing the include to a require in memcache.inc

v1p3r1c3’s picture

Try to put the code after $db_url in settings.php and change it to $conf['cache_inc'] dont use the array

$db_url = '#########################';
$db_prefix = '';

$conf['cache_inc'] ='sites/all/modules/memcache/memcache.inc';

It works for us.

ajayg’s picture

Deleting my comment here as I found my own configuration error.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Patch no-longer applies to 6.x - could someone re-roll?

catch’s picture

Status: Needs work » Closed (duplicate)

Just committed more or less the same patch from #885478: Improve Memcache as installation profile friendly, marking duplicate (despite this being the older issue).

geberele’s picture

Hello!
I'd like to know how enable "Summary logging (Memcached)" in performance logging.

I configured php.ini:

memcache support enabled
Active persistent connections 0
Version 2.2.6
Revision $Revision: 303962 $

Directive Local Value Master Value
memcache.allow_failover 1 1
memcache.chunk_size 8192 8192
memcache.default_port 11211 11211
memcache.default_timeout_ms 1000 1000
memcache.hash_function crc32 crc32
memcache.hash_strategy standard standard
memcache.max_failover_attempts 20 20

and config.php:

$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';
$conf['memcache_servers'] = array(
'localhost:11211' => 'default'
);
$conf['memcache_bins'] = array(
'cache' => 'default'
);

But "Summary logging (Memcached)" in performance logging is still disable.
Any suggestion?

Thanks

naero’s picture

#22 above worked for me, too. I had my statements way at the bottom of settings.php, but kept getting a notice on the status report saying it wasn't installed. Go figure.

http://drupal.org/node/592458#comment-4133002

arrow’s picture

After hours of messing with this, it turns out that #22 was the fix for me as well.

talhaamalik’s picture

Issue summary: View changes

I hard coded:

require('/var/www/vhosts/domain.in/httpdocs/sites/all/modules/memcache/dmemcache.inc');

Worked for me...