In Drupal 7 we have a very nice "registry" that registers what PHP classes should be loaded from what files.
Unfortunately you can get the system into a state where it can't bootstrap to a high enough level to rebuild the registry (normally done by clearing the cache). What do you do then?
Since the solution given in the Views queue didn't work for me, I created a package that you can use to get out of this trouble, Registry Rebuild.
When would you need Registry Rebuild?
You might get something like:
PHP Fatal error: Class 'EntityAPIControllerExportable' not found in ...sites/all/modules/rules/includes/rules.core.inc on line 11
If this happens when you're trying to run update.php, and happens when you're trying to clear your cache, well, you have some trouble. That's what Registry Rebuild is for.
When would you *not* need Registry Rebuild?
If you can access any page, or install a module, or run update.php, you almost certainly don't need Registry Rebuild.
Please see the project page for instructions how to use it.