Seems there is a bug with the memcache_admin module on the newly released 7.x-1.6 version of this module.Steps to reproduce, on a clean Drupal 7 site:

drush dl memcache
drush en -y memcache
drush en -y memcache_admin
drush cc all

I get hit with:

PHP Fatal error: Call to undefined function dmemcache_object_cluster() in /Users/thomaswilhelm/Sites/drupal-7.43/sites/all/modules/memcache/memcache_admin/memcache_admin.module on line 63

Fatal error: Call to undefined function dmemcache_object_cluster() in /Users/thomaswilhelm/Sites/drupal-7.43/sites/all/modules/memcache/memcache_admin/memcache_admin.module on line 63
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function dmemcache_object_cluster() in /Users/thomaswilhelm/Sites/drupal-7.43/sites/all/modules/memcache/memcache_admin/memcache_admin.module, line 63

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ThomWilhelm created an issue. See original summary.

Jeremy’s picture

Category: Bug report » Support request
Status: Active » Fixed

Please review the documentation on how to install/enable memcache.

It is NOT enough to just enable the modules. You have to configure settings.php properly. From the EXAMPLES section:

  $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;
ThomWilhelm’s picture

Ok no worries Jeremy, just with the previous version I didn't get any fatal errors like this when I didn't have memcache setup locally, I'd get a few warnings such as the below but that was about it:

WD memcache: Failed to connect to memcache server: 127.0.0.1:11211

I'll adjust my settings locally to prevent this from happening, wouldn't usually expect this to fire a fatal error about a function not being declared though.

brentratliff’s picture

I agree, this shouldn't throw a fatal error. I don't even have memcache enabled and this update kills my site. If it's just in the codebase, the error exists.

Jeremy’s picture

Category: Support request » Bug report
Status: Fixed » Active

If you're seeing the fatal, you must have memcache_admin enabled. Regardless, agreed, we can handle this sort of misconfiguration more gracefully. Re-opening.

brentratliff’s picture

Thanks Jeremy, good call. I did still have memcache admin enabled. Makes sense, I guess I should have actually read the error more closely.

IrishAdo’s picture

Any Idea how I can disable this module as I get the error on all pages and in the command line

> drush dis memcache_admin
PHP Fatal error: Call to undefined function dmemcache_object_cluster() in.....

kevinn’s picture

Status: Active » Needs review
FileSize
760 bytes

Maybe this patch will do it?

brentratliff’s picture

I had memcache disabled before the update and used drush to disable memcache admin after the update. Did you try to disable memcache first and then admin via drush? You could also set the system table record to 0 for both modules via SQL. It's not ideal, but better than your site being down.

  • Jeremy committed 25224fb on 7.x-1.x
    Issue #2856140 by kevinn, Jeremy: Call to undefined function...
Jeremy’s picture

Status: Needs review » Fixed

@kevinn yes, that solves it. I also added a hook_requirements() implementation to try and avoid this misconfiguration, and to complain in the Status report if already enabled.

fubarhouse’s picture

I'm very much looking forward to this making it into a release, does anybody have an estimated date of release for this patch?

Jeremy’s picture

There is no planned release at this time. Generally this will happen after we collect one or more critical bug fixes, and/or have added some new features. At this time this is the only change that's been committed since the last release, and it's not generally critical enough to warrant a release for it alone.

Status: Fixed » Closed (fixed)

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

Elijah Lynn’s picture

Version: 7.x-1.6-rc3 » 7.x-1.6
dullarobin’s picture

@kelvin #8, patch working fine
thanks

newmediajosh’s picture

FYI I believe the confusion also comes from the community documentation:
https://www.drupal.org/node/1131468

Step 4 is "Download and install the memcache module."
Step 7 is "Edit settings.php to make memcache the default cache class."

When I installed the module, I instinctively enabled the admin interface as well because there's nothing referencing it in the doc. Then I go the crash.

Should the community doc be updated? I've never done that before but I'm happy to give it a go if it's the right thing to do.

hambil01’s picture

@kelvin #8, patch working fine
thanks

DarrellDuane’s picture

Please re-open this case and apply this patch and make a new release. I am having this problem when I enable new modules and clear caches via the web interface to my Drupal 7 site.

jim22’s picture

Same issue.

Thanks @kevinn. Patch #8 working for me.

thetwentyseven’s picture

Without the patch: Remove the module files. Download module_missing_message_fixer module, and run in the command line 'drush mmmff --all'. Clear the cache, and then you can put back the module folder if you want.

Kevin Morse’s picture

Patch #8 does the trick. Any reason this isn't in the release candidate?

Jeremy’s picture

Thanks for the head's-up -- a few of the earlier commits to this release were missing from the -rc1 release notes, but are now included in the official release notes for 7.x-1.7.