Project:Memcache API and Integration
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

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!

Comments

#1

subscribing same on fedora plateform
thx

#2

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'
  ),
);

#3

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

#4

Status:active» fixed

No further feedback, closing.

#5

Status:fixed» active

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

<?php
/**
* 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'),
);
?>

#6

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

#7

Status:active» fixed

Fix explained above, closing.

#8

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

#9

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????

#10

Nobody can help on this????

#11

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

#12

Status:active» postponed (maintainer needs more info)

#13

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.

#14

Status:postponed (maintainer needs more info)» fixed

@longwave thanks. I think this can be closed.

#15

Status:fixed» closed (fixed)

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

#16

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...

#17

Status:closed (fixed)» active

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

thanks...

#18

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

Patch attached.

AttachmentSize
memcache_requirements_fix.patch 1.96 KB

#19

Component:Miscellaneous» Code
Category:support request» bug report
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.

#20

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.

#21

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

<?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

#22

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.

#23

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

#24

Status:reviewed & tested by the community» needs work

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

#25

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).

#26

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