ServerTune

Browse by category

Search    |    Advanced search

Fatal error: Config.php on line 142

If you get the error message stated in the subject of this article, there are two solutions, depending on your system:

Fatal error: Call to a member function extend() on a non-object in /path/to/store/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 142

Solution #1:

Insert the following syntax before the very first query in your database:

SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;

Solution #2:

If you imported your database and experiencing this problem, in PhpMyAdmin, run the following query:

UPDATE `core_store` SET `store_id` = 0 WHERE `code` like 'admin';
UPDATE `core_website` SET `website_id` = 0 WHERE `code` like 'admin';
UPDATE `customer_group` SET `customer_group_id` = 0 WHERE`customer_group_code` like 'NOT LOGGED IN';

- NOTE

In some cases, you may need to turn the foreign keys off before running the 3 queries given above:

     SET FOREIGN_KEY_CHECKS=0; 

Then run the 3 queries. When that's done, turn the foreign keys back on:

     SET FOREIGN_KEY_CHECKS=1; 
 
 
Add comment
 
Views: 1033
 
Votes: 0
 
Comments: 0
 

Other articles in this Category

RSS