1

To begin I already tried the following:

  1. I located the root directory where my Magento is installed and searched for the “errors” directory.

  2. I changed the filename of local.xml.sample to local.xml

  3. I reloaded the page where it shows error message. I will paste this below.

  4. I located magento_directory/lib/Zend/Cache/Backend/File.php and looked for:

    protected $_options = array(

    'cache_dir' => 'null',

I replaced it with:

protected $_options = array(
'cache_dir' => 'tmp/',

I saved the file and uploaded it to the server

  1. I created “tmp” in the Magento directory

  2. I refreshed the page and the error that is on every page of the site.

Here is the full error message, I am not sure what to do with it as I usually don't use Magento and am doing this pro-bono for a nonprofit.

Error in file: "/opt/bitnami/apache2/htdocs/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'mage_core_email_queue' already exists, query was: CREATE TABLE `mage_core_email_queue` (
  `message_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Message Id' ,
  `entity_id` int UNSIGNED NULL COMMENT 'Entity ID' ,
  `entity_type` varchar(128) NULL COMMENT 'Entity Type' ,
  `event_type` varchar(128) NULL COMMENT 'Event Type' ,
  `message_body_hash` varchar(64) NOT NULL COMMENT 'Message Body Hash' ,
  `message_body` mediumtext NOT NULL COMMENT 'Message Body' ,
  `message_parameters` text NOT NULL COMMENT 'Message Parameters' ,
  `created_at` timestamp NULL default NULL COMMENT 'Creation Time' ,
  `processed_at` timestamp NULL default NULL COMMENT 'Finish Time' ,
  PRIMARY KEY (`message_id`),
  INDEX `747D3AF379628D00D009E037E2942C80` (`entity_id`, `entity_type`, `event_type`, `message_body_hash`)
) COMMENT='Email Queue' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci

Trace:
#0 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.4', '1.6.0.6')
#2 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.4', '1.6.0.6')
#3 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /opt/bitnami/apache2/htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /opt/bitnami/apache2/htdocs/index.php(87): Mage::run('', 'store')
#8 {main}
  • I already cleared /var/cache and used ssh to run indexer.php hoping that would solve my issue – Codeboy Dec 28 '14 at 8:19
  • Something went wrong, so the table wasn't created. – Fabian Blechschmidt Dec 28 '14 at 11:00
  • Base table or view already exists: 1050 Table 'mage_core_email_queue' – user2857 Dec 28 '14 at 11:43
  • possible duplicate of Install Error ver 1.8.1.0 – user2857 Dec 29 '14 at 10:10
2

Something went wrong, so the table wasn't created. And because you can't be sure this is the only problem, get your backup and start from the beginning.

Sorry, too stupid to read an error message. You are right. Then it might be, that you request the page two times, so the install script runs two times. You can try to just remove everything from the script and try it again. But here the same counts as before:

And because you can't be sure this is the only problem, get your backup and start from the beginning.

  • table was already there, that's what the error message says. – user2857 Dec 29 '14 at 10:04
  • updated the answer. – Fabian Blechschmidt Dec 29 '14 at 13:22
1

I had the similar error when I am updating Magento from 1.7.0.2 to 1.9.1.1. I removed 2 tables:

core_email_queue
core_email_queue_recipients

After that Magento successfully updated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.