Fatal error: Call to a member function getAllOptions() on a non-object in /app/code/core/Mage/Core/Model/Cache.php on line 434 In Magento



Magento Upgrade is very hard process because we are going to upgrade the old version to the new version and there may be alot of extension which is currently working with the current code means using the old code and now we are going to upgrade the Magento then it may be some extension stop working with the new upgraded version here is the most common error after upgrade is

Fatal error: Call to a member function getAllOptions() on a non-object in /app/code/core/Mage/Core/Model/Cache.php on line 434. Follow the steps to remove this error.

Step 1. Delete all the content of the var folder like var/cache, var/session and var/locks.
Step 2. Check the permisson of the var folder and provide the 775 or 777 permission to this folder.
Step 3. Check the app/etc/config.xml and the app/etc/local.xml it is there are not if it is not presents in this folder upload the files from your backup.
Step 4. Try to empty database cache by running sql command:

TRUNCATE TABLE `core_cache`

Step 5. Navigate to the app/Mage.php and search for the code below:

//self::$_appRoot = null;
Uncomment it and it will be just like as:
self::$_appRoot = null;

it is called by app/code/core/Mage/Core/Model/Config/Options.php at line 54:

$appRoot= Mage::getRoot(); This returns an empty string, that is the reason why Magento was broken.

Step 6. Reinstall the latest AITOC extensions.

Hope it will help to someone to get rid of such kind of the problem.