If you wish to find out more information about the Drupal registry, you can read the Drupal 7's code registry article on Drupal.org.
Clearing caches
Drupal 7 registry issues can look like cache problems. If you're not sure that you've cleared all the caches, you can try the different options for clearing cache as suggested by Chris Shattuck's cache clearing instructions page.
The easiest way to ensure that you've cleared all Drupal caches is to use the following Drush command (which is an abbreviated form of drush cache-clear all
):
drush cc all
If, after clearing the cache, you still encounter errors similar to the following, you might need to rebuild the registry:
PHP Fatal error: Class 'EntityAPIControllerExportable' not found in ...sites/all/modules/rules/includes/rules.core.inc on line 11
Rebuilding the registry
The best way to rebuild your registry is to use Drush from the command line. Run the following command in either the sites/default
or sites/all/[sitename]
folder for a site:
drush php-eval "registry_rebuild();"
If Drush is not working properly, you can also try:
php ~/.drush/registry_rebuild/registry_rebuild.php
Alternate methods
For information about registry_rebuild
(a bootstrap function that can help you rebuild your registry), see the function registry_rebuild API documentation.
You can also rebuild your Drupal registry by using the Registry Rebuild script and procedure found on Drupal.org.