Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Upgraded from 1.2.0.3 to 1.2.1 and got a fatal error. Please help…
 
Chris Nudd
Jr. Member
 
Total Posts:  28
Joined:  2008-05-17
 

Any major issues with 1.2, blew up on install:

Can’t access front of backend. Any suggestions? Seems like it didnt create some new tables and files. Tried using db with another install and won’t work either. HELPP!!!

a:2:{i:0;s:256:"Error in file: “/home1/posdirec/public_html/store/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘cataloginventory_stock_status’ already exists";i:1;s:1149:"#0 /home1/posdirec/public_html/store/app/code/core/Mage/Core/Model/Resource/Setup.php(292): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /home1/posdirec/public_html/store/app/code/core/Mage/Core/Model/Resource/Setup.php(179): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘0.7.4’, ‘0.7.5’)
#2 /home1/posdirec/public_html/store/app/code/core/Mage/Core/Model/Resource/Setup.php(146): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’0.7.4’, ‘0.7.5’)
#3 /home1/posdirec/public_html/store/app/code/core/Mage/Core/Model/Resource/Setup.php(121): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home1/posdirec/public_html/store/app/code/core/Mage/Core/Model/Config.php(214): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home1/posdirec/public_html/store/app/code/core/Mage/Core/Model/App.php(242): Mage_Core_Model_Config->init(Array)
#6 /home1/posdirec/public_html/store/app/Mage.php(432): Mage_Core_Model_App->init(’default’, ‘store’, Array)
#7 /home1/posdirec/public_html/store/app/Mage.php(453): Mage::app(’default’, ‘store’, Array)
#8 /home1/posdirec/public_html/store/index.php(52): Mage::run(’default’)
#9 {main}”;}

 
Magento Community Magento Community
Magento Community
Magento Community
 
piotr0223
Jr. Member
 
Total Posts:  1
Joined:  2008-10-02
 

after upgrade from 1.2.0.3.  to 1.2.1
I can’t access front of backend. Any suggestions?

Error in file: “/hed/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘cataloginventory_stock_status’ already exists
Trace:
#0 /hed/app/code/core/Mage/Core/Model/Resource/Setup.php(292): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /hed/app/code/core/Mage/Core/Model/Resource/Setup.php(179): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘0.7.4’, ‘0.7.5’)
#2 /hed/app/code/core/Mage/Core/Model/Resource/Setup.php(146): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’0.7.4’, ‘0.7.5’)
#3 /hed/app/code/core/Mage/Core/Model/Resource/Setup.php(121): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /hed/app/code/core/Mage/Core/Model/Config.php(214): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /hed/app/code/core/Mage/Core/Model/App.php(242): Mage_Core_Model_Config->init(Array)
#6 /hed/app/Mage.php(432): Mage_Core_Model_App->init(’’, ‘store’, Array)
#7 /hed/app/Mage.php(453): Mage::app(’’, ‘store’, Array)
#8 /hed/index.php(52): Mage::run()

 
Magento Community Magento Community
Magento Community
Magento Community
 
finch8243
Sr. Member
 
Total Posts:  79
Joined:  2007-08-31
 

Oh snap, this just happened to me too.  Please help.

Error in file"/home/dparcs/public_html/arcs/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php" SQLSTATE[42S01]Base table or view already exists1050 Table 'cataloginventory_stock_status' already exists
Trace
:
#0 /home/dparcs/public_html/arcs/app/code/core/Mage/Core/Model/Resource/Setup.php(292): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/dparcs/public_html/arcs/app/code/core/Mage/Core/Model/Resource/Setup.php(179): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.7.4', '0.7.5')
#2 /home/dparcs/public_html/arcs/app/code/core/Mage/Core/Model/Resource/Setup.php(146): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.7.4', '0.7.5')
#3 /home/dparcs/public_html/arcs/app/code/core/Mage/Core/Model/Resource/Setup.php(121): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/dparcs/public_html/arcs/app/code/core/Mage/Core/Model/Config.php(214): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/dparcs/public_html/arcs/app/code/core/Mage/Core/Model/App.php(242): Mage_Core_Model_Config->init(Array)
#6 /home/dparcs/public_html/arcs/app/Mage.php(432): Mage_Core_Model_App->init('', 'store', Array)
#7 /home/dparcs/public_html/arcs/app/Mage.php(453): Mage::app('', 'store', Array)
#8 /home/dparcs/public_html/arcs/index.php(52): Mage::run()
#9 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
spuky
Jr. Member
 
Total Posts:  4
Joined:  2008-07-18
 

Step 1

I inserted an:

DROP TABLE IF EXISTS {$this->getTable('cataloginventory_stock_status')};
before the
DROP TABLE IF EXISTS {$this->getTable('cataloginventory_stock_status')};
line into:/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php

and reloded the page… this made shure that I hve the new strukture

maybe you are fineshed here.

Step 2:

my magento was having still some issues…

then I comented out the whole file...(:/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php)

and relaoded the page again…

Now I am up and running.. just to be shure I did
Update Inventory Stock Status under chache control

since I have a lot of items in my DB for me the second error was looking like a timeout…
so maybe you will be fine after Step 1

spuky

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

This problem occurs if the upgrade fails in the middle, possibly because of a permission issue or timeout. Then some of the database tables are updated, but the Magento upgrade scripts will still try to add/alter the tables. The only way to fix this is by adding ‘DROP TABLE’ statements in the affected SQL upgrade scripts like ‘spuky’ explained.

 
Magento Community Magento Community
Magento Community
Magento Community
 
somesid
Sr. Member
 
Total Posts:  83
Joined:  2008-06-20
 
spuky - 03 February 2009 01:21 AM

Step 1

then I comented out the whole file...(:/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php)

Instead of commenting the whole file, you can do this, so it is upgraded correctly :
(if you have a thousands of products it will take 5 to 10 minutes)

//$installer = $this;
///* @var $installer Mage_Core_Model_Resource_Setup */
//
//$installer->startSetup();
//$installer->run("
//CREATE TABLE `{$installer->getTable('cataloginventory_stock_status')}` (
//  `product_id` int(10) unsigned NOT NULL,
//  `website_id` smallint(5) unsigned NOT NULL,
//  `stock_id` smallint(4) unsigned NOT NULL,
//  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000',
//  `stock_status` tinyint(3) unsigned NOT NULL,
//  PRIMARY KEY (`product_id`,`website_id`,`stock_id`),
//  CONSTRAINT `FK_CATALOGINVENTORY_STOCK_STATUS_STOCK` FOREIGN KEY (`stock_id`) REFERENCES `{$installer->getTable('cataloginventory_stock')}` (`stock_id`) ON DELETE CASCADE ON UPDATE CASCADE,
//  CONSTRAINT `FK_CATALOGINVENTORY_STOCK_STATUS_PRODUCT` FOREIGN KEY (`product_id`) REFERENCES `{$installer->getTable('catalog_product_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
//  CONSTRAINT `FK_CATALOGINVENTORY_STOCK_STATUS_WEBSITE` FOREIGN KEY (`website_id`) REFERENCES `{$installer->getTable('core_website')}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
//) ENGINE=InnoDB DEFAULT CHARSET=utf8;
//");
//$installer->endSetup();
set_time_limit(0);
Mage::getModel('cataloginventory/stock_status')->rebuild();
 
Magento Community Magento Community
Magento Community
Magento Community
 
RH
Sr. Member
 
Avatar
Total Posts:  81
Joined:  2007-10-09
 

Hello.

I’m also getting the error when upgrading, i have pasted the code from app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php

is the code below correct as i’m still getting the error.

THANKS

<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_CatalogInventory
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

$installer = $this;
/* @var $installer Mage_Core_Model_Resource_Setup */

//$installer = $this;
///* @var $installer Mage_Core_Model_Resource_Setup */
//
//$installer->startSetup();
//$installer->run(”
//CREATE TABLE `{$installer->getTable(’cataloginventory_stock_status’)}` (
// `product_id` int(10) unsigned NOT NULL,
// `website_id` smallint(5) unsigned NOT NULL,
// `stock_id` smallint(4) unsigned NOT NULL,
// `qty` decimal(12,4) NOT NULL DEFAULT ‘0.0000’,
// `stock_status` tinyint(3) unsigned NOT NULL,
// PRIMARY KEY (`product_id`,`website_id`,`stock_id`),
// CONSTRAINT `FK_CATALOGINVENTORY_STOCK_STATUS_STOCK` FOREIGN KEY (`stock_id`) REFERENCES `{$installer->getTable(’cataloginventory_stock’)}` (`stock_id`) ON DELETE CASCADE ON UPDATE CASCADE,
// CONSTRAINT `FK_CATALOGINVENTORY_STOCK_STATUS_PRODUCT` FOREIGN KEY (`product_id`) REFERENCES `{$installer->getTable(’catalog_product_entity’)}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
// CONSTRAINT `FK_CATALOGINVENTORY_STOCK_STATUS_WEBSITE` FOREIGN KEY (`website_id`) REFERENCES `{$installer->getTable(’core_website’)}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
//) ENGINE=InnoDB DEFAULT CHARSET=utf8;
//");
//$installer->endSetup();
set_time_limit(0);
Mage::getModel(’cataloginventory/stock_status’)->rebuild();

 
Magento Community Magento Community
Magento Community
Magento Community
 
thebullet
Jr. Member
 
Total Posts:  23
Joined:  2008-10-16
 

I try to upgrade to 1.2.1 from 1.2.0.3 through Magento Connect Manager and after all downloading this error occur:

Fatal error: Out of memory (allocated 30408704) (tried to allocate 1113629 bytes) in /homepages/8/d110405264/htdocs/CBOnline/magento/downloader/pearlib/php/PEAR/Registry.php on line 1059

Anybody knows what is wrong?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

@thebullet: you have exceeded the PHP memory limit on your server. You can try to increase the limit by placing this in your .htaccess:

php_value memory_limit 128M

This will increase the value of memory_limit to 128 MB.

Or if PHP is running in CGI mode, insert ‘memory_limit = 128M’ in your php.ini file.

If neither works, you can contact your host and ask them to increase the memory limit.

 
Magento Community Magento Community
Magento Community
Magento Community
 
thebullet
Jr. Member
 
Total Posts:  23
Joined:  2008-10-16
 

@Sindre|ProperHost thanks for yopur reponse.

I have that line in my .htaccess file, my host is 1and1.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RH
Sr. Member
 
Avatar
Total Posts:  81
Joined:  2007-10-09
 

@Sindre|ProperHost

Any ideas for my problem? Am i doing the right thing?

You seem like someone that know what they are talking about.

Thanks

ROBERT

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

@thebullet: then it looks like your host does not allow you to override the default setting. You will have to contact 1and1 and kindly ask them to increase the memory limit for you. However, I have heard from some of our clients that Magento does not run very well on their shared hosting.

@RH: please post the exact error message you are getting. There are many almost identical mysql4-upgrade-x scripts, so make sure you edit the correct one. Also, when you fix one, there might be others that generate a slightly different error as well. If the error says that the table/view already exists, you can insert a ‘DROP TABLE’ statement in front of the ‘CREATE TABLE’ statement.

Like this:

DROP TABLE IF EXISTS {$this->getTable(’cataloginventory_stock_status’)};
CREATE TABLE `{$installer->getTable('cataloginventory_stock_status')}` (

You must of course adjust the table name above to reflect the particular file causing the problem.

There might be other steps that must be taken as well to recover the store. Unfortunately, it is a bit hard to provide remote assistance like this on the forums.

 
Magento Community Magento Community
Magento Community
Magento Community
 
zadpro
Sr. Member
 
Avatar
Total Posts:  247
Joined:  2007-12-10
FL, USA
 

Has anybody found a solution to the following error. This one is not a duplicate table. It is a duplicate entry:

Error in file"/home/mysite/public_html/test/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.29-0.9.30.php" SQLSTATE[23000]Integrity constraint violation1062 Duplicate entry '3-599-8' for key 2
Trace
:
#0 /home/mysite/public_html/test/app/code/core/Mage/Core/Model/Resource/Setup.php(292): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/mysite/public_html/test/app/code/core/Mage/Core/Model/Resource/Setup.php(179): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.9.29', '0.9.31')
#2 /home/mysite/public_html/test/app/code/core/Mage/Core/Model/Resource/Setup.php(146): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.9.29', '0.9.31')
#3 /home/mysite/public_html/test/app/code/core/Mage/Core/Model/Resource/Setup.php(121): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/mysite/public_html/test/app/code/core/Mage/Core/Model/Config.php(214): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/mysite/public_html/test/app/code/core/Mage/Core/Model/App.php(242): Mage_Core_Model_Config->init(Array)
#6 /home/mysite/public_html/test/app/Mage.php(432): Mage_Core_Model_App->init('', 'store', Array)
#7 /home/mysite/public_html/test/app/Mage.php(453): Mage::app('', 'store', Array)
#8 /home/mysite/public_html/test/index.php(52): Mage::run()
#9 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
symmetrics_at
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2008-08-17
Hannover, Germany
 

I had same problem.
Solution: http://www.magentocommerce.com/wiki/groups/227/convert_database_to_innodb
(InnoDB requirement with 1.2.1)
http://www.magentocommerce.com/boards/viewthread/30810/

 
Magento Community Magento Community
Magento Community
Magento Community
 
resonance
Member
 
Avatar
Total Posts:  62
Joined:  2008-09-24
 

I had this same problem. The update scripts would timeout, saying 120 seconds exceeded. I have looked all over for 120 seconds, but cannot find it. It is set *way* higher in php.ini and .htaccess both.

Anyhow, after fixing the table exists errors as above, I would get this:

Fatal error: Maximum execution time of 120 seconds exceeded in C:\Documents and Settings\Administrator\Desktop\xampp\htdocs\magento\lib\Zend\Db\Statement\Pdo.php on line 232

So, I went to line 232 of that file, and inserted set_time_limit(0); like this:

public function _execute(array $params null)
    
{
        set_time_limit
(0);
        try 
{
            
if ($params !== null{

And it worked.

Edit: here is where those pesky time limits are set:

app/code/core/Mage/Core/Model/Resource/Setup.php:507:        @set_time_limit(120);
app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php:721:        @set_time_limit(240);
app/code/core/Mage/Install/controllers/WizardController.php:26:@set_time_limit(120);
downloader/pearlib/download/Mage_Core_Modules-1.2.0.3/Mage/Core/Model/Resource/Setup.php:493:        @set_time_limit(120);
downloader/pearlib/download/Mage_Core_Modules-1.2.0.3/Mage/Customer/Model/Convert/Adapter/Customer.php:721:        @set_time_limit(240);
downloader/pearlib/download/Mage_Core_Modules-1.2.0.3/Mage/Install/controllers/WizardController.php:26:@set_time_limit(120);
downloader/pearlib/download/Mage_Core_Modules-1.2.1/Mage/Core/Model/Resource/Setup.php:507:        @set_time_limit(120);
downloader/pearlib/download/Mage_Core_Modules-1.2.1/Mage/Customer/Model/Convert/Adapter/Customer.php:721:        @set_time_limit(240);
downloader/pearlib/download/Mage_Core_Modules-1.2.1/Mage/Install/controllers/WizardController.php:26:@set_time_limit(120);

So..... it’s one of those buggers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
zadpro
Sr. Member
 
Avatar
Total Posts:  247
Joined:  2007-12-10
FL, USA
 
McAndrews - 04 February 2009 12:05 PM

I had such a problem.
Solution: http://www.magentocommerce.com/wiki/groups/227/convert_database_to_innodb
(InnoDB requirement with 1.2.1)
http://www.magentocommerce.com/boards/viewthread/30810/

I checked my database tables. I have all my tables setup as InnoDB even before upgrading to 1.2.1. But I’m still getting that crazy error message that duplicate entry exists.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2