After updating my Drupal test server to have a fresh copy of the database and code from the production system, "drush cc all" would fail with a message saying

PHP Fatal error: Call to undefined function user_load() in /usr/share/pear/drush/includes/drupal.inc on line 138

I'm running drush version 6.2.0 with a drupal 7.25 system. I'm using memcache as cache_default_class.

  • Can you clear caches via the Performance screen? Does the site work otherwise?
    – jmking
    Commented Jan 13, 2014 at 22:09
  • The site was completely dead, white screen and a fatal PHP error in the apache error log: "PHP Fatal error: Call to undefined function system_run_automated_cron() in /srv/www/www.imsa.edu/drupal1/includes/common.inc on line 2706" Commented Jan 14, 2014 at 15:05
  • Sounds like you're missing some files. Are you sure you copied everything from production?
    – jmking
    Commented Jan 14, 2014 at 15:06
  • jmking, that's what I thought too, but I diffed the files between test and production and they matched exactly (except for settings.php, of course). Commented Jan 14, 2014 at 15:11

1 Answer 1


The problem went away after I restarted memcached.

I discovered that by running drush with -d and seeing a PHP error about a $theme value not being a valid index. Tracing the code showed that access to cache_bootstrap was getting empty arrays for the module and theme data.

From now on I plan to restart memcached or flush its cache on my test server after rebuilding its database. (I've done this kind of rebuilding dozens of times before with no issues.)

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.