Magento error — Notice: Undefined index: 0 in app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

This will most likely occur when migrating Magento from one host to another. The fix, while not so obvious and easy t find turned out to be quite easy ;)  During the installation, Magento sets two IDs to 0 in its database. However, when importing the database dump to your new host, MySQL doesn’t like this and changes these ID’s to 2, which of course is not what Magento needs to load, thus the error. The fix is quite easy — set these IDs back to 0.

The IDs, we need are for ‘admin’ in the tables:

  • core_store
  • core_website

Just open phpMyAdmin and change 2 to 0, clear Magento’s cache by deleting the contents of the /var/cache folder and Voila!

Also, it will be a good idea to check the box for “Disable foreign key checks”, when exporting it in the firt place, as you will surely  receive an error for this when importing ;)

Bookmark and Share

  • No Related Post
bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
tabs-top  banner ad


One Response to “Magento error — Notice: Undefined index: 0 in app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92”

  1. James Bowles says:

    You’re awesome…thanks for the tip!

Leave a Reply