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

How to upgrade from 1.5.1 to 1.6.0
 
horhell
Jr. Member
 
Total Posts:  4
Joined:  2011-07-04
 

yeah....this could be a problem , the website was updated to 1.6 and I have no backups of the previous version , basically I have to fix the 1.6 version with this error .

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanf
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2009-12-06
 

This worked for me from Mage 1.5.1.0 (never could get the new ./mage working...although the old ./pear channel always worked).

From the Magento root directory via SSH run:

wget http://www.magentocommerce.com/downloads/assets/1.6.0.0/magento-1.6.0.0.tar.gz

Then extract it:

tar -zxvf magento-1.6.0.0.tar.gz

Then enter the extracted directory:

cd magento

Then copy the new files back:

cp -rf * ../.

Also get the .htaccess file (I think this is required):

cp .htacess ../.

Then cleanup the downloaded files:

cd ../
rm -rf magento
rm magento
-1.6.0.0.tar.gz

Open the site’s homepage in your browser. It will probably throw SQL errors and continue loading. If you refresh it will probably throw a different SQL error, but don’t do this. Just let it run. Depending on your server it might take 2-30 minutes to upgrade the DB. Who knows. My dev server took about 10.

I like to run this command via SSH:

top

You can monitor the SQL process. When it stops chewing up memory and CPU it’s done (or it crashed). Type ‘q’ to return to the shell prompt. Then refresh the site’s homepage in your browser. Worked for me.

Test the Magento admin. Should say 1.6.0.0 in the footer.

FYI, this info is partially based on this post:
http://www.magentocommerce.com/boards/viewthread/219570/P30/#t301770

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bazz78
Sr. Member
 
Avatar
Total Posts:  156
Joined:  2008-06-16
Italy
 

OK, for those who have time-out try this:

import database

delete this tables:

dataflow_batch_export
dataflow_batch_import
log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info
log_visitor_online
report_viewed_product_index
report_compared_product_index
report_event

install magento 1.6

the site is up, now I’m testing all…

first problems encountered is the inability to reindex some tables… as Tag Aggregation Data , Product Flat Data , Catalog Search Index ....
but that’s another story

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

@Bazz78:: thanks for the SQL tips, I will post those!

 
Magento Community Magento Community
Magento Community
Magento Community
 
ukgoods
Member
 
Avatar
Total Posts:  44
Joined:  2008-07-20
 

Help!  I have tried everything in this thread to upgrade my development database from version 1.5.1 to version 1.6.  No matter what I do I keep getting the following error:

a:5:{i:0;s:222:"Error in file: “/chroot/home/gordond/dev.ukgoods.com/html/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘t-797’ for key 2";i:1;s:1104:"
#0 /chroot/home/gordond/dev.ukgoods.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /chroot/home/gordond/dev.ukgoods.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘0.8.28’, ‘1.6.0.1’)
#2 /chroot/home/gordond/dev.ukgoods.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’0.8.28’, ‘1.6.0.1’)
#3 /chroot/home/gordond/dev.ukgoods.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /chroot/home/gordond/dev.ukgoods.com/html/app/code/core/Mage/Core/Model/App.php(408): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /chroot/home/gordond/dev.ukgoods.com/html/app/code/core/Mage/Core/Model/App.php(336): Mage_Core_Model_App->_initModules()
#6 /chroot/home/gordond/dev.ukgoods.com/html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /chroot/home/gordond/dev.ukgoods.com/html/index.php(80): Mage::run(’’, ‘store’)
#8 {main}”;s:3:"url”;s:1:"/”;s:11:"script_name”;s:10:"/index.php”;s:4:"skin”;s:7:"default";}

I have searched my entire database for “t-797” to no avail.  Could someone point me to the table which is causing this problem?

Thanks,

Donna

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Did your installation fail at some point?

Did you try putting the constraint check off before you started the install?

(Make sure you dump and recreate the database before you start a new install)

 
Magento Community Magento Community
Magento Community
Magento Community
 
raqy
Jr. Member
 
Total Posts:  24
Joined:  2010-01-08
 

as for Bazz78 suggestion - for myself, i can’t give up Report_event table data - as i have to keep views data for royalties report (custom report i created based on Magento views report).

Also, can’t give up sales history data (referring to the suggested above)

You can’t just drop all your data in order to upgrade… it’s an upgrade not new installation - data must be kept for proper business conduct.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ukgoods
Member
 
Avatar
Total Posts:  44
Joined:  2008-07-20
 

I\’ve tried it about 20 times on my development site.  The steps I took were:

Delete my development database
Recreate my development database
Do a mysql dump of my live site
Import via mysql the dump of my live site into the empty development database
Delete my old Magento
Unzip the 1.6.0 zip file
Copy my live local.xml (with the database path and user and putting off the constraint check
Via phpmyadmin, change all instances of my live site (www.ukgoods.com) to my dev site (dev.ukgoods.com)
Run the database repair tool
Then I try the install.  It always stops after about 10 minutes with the same error.

I have also tried deleting these tables:

dataflow_batch_export
dataflow_batch_import
log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info
log_visitor_online
report_viewed_product_index
report_compared_product_index
report_event
Could you point me towards the table with the problem?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
ukgoods
Member
 
Avatar
Total Posts:  44
Joined:  2008-07-20
 

I forgot, I also removed the cache and reindexed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PurpleARO
Member
 
Total Posts:  50
Joined:  2009-02-25
 

as far as my previous experience with updating my clients with magento 1.5.x series my simple steps were as follows (this is on a live dedicated sever - not local)

1 - Create a Sub-domain (upgrade.domain.com)

2 - Create a backup of my live DB (MySQLDump > backupdb.sql)

3 - Create a BLANK DB

4 - Drop the BACKUP LIVE DB into the Blank DB (MySQL < backupdb.sql)

5 - Upload Magento Tar.gz file and extract

6 - Run Installation Using the NEW DB (DB in step 3)

7 - Copy necessary themes and media directory

Site is up and running............................

I have done that in all my 1.5.x series updates, now when I try these procedure for the 1.6 it takes at least 20 minutes to go through the next step of the installation page and it eventually goes into an error

------- Now I have tried to do a fresh install with a new blank DB and under local.xml I changed it to the backup LIVE DB and refreshed CACHE it does work but with one issue the TBT Enhanced Grid gives the admin page an error.

Any insights.....

 
Magento Community Magento Community
Magento Community
Magento Community
 
PurpleARO
Member
 
Total Posts:  50
Joined:  2009-02-25
 

I also realized on this update it takes so much longer to update a DB, error or no error, in the previous versions I have databases that were 800mb in size and it took like 2 mins to merge.

Hmmmmmmm

Insights please…

 
Magento Community Magento Community
Magento Community
Magento Community
 
dbabaev
Sr. Member
 
Total Posts:  83
Joined:  2008-03-29
 

i cannot believe the Magento team has not responded to all this frustration we are having. It’s like the Community edition folks are outcast.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hammock_vienna
Member
 
Total Posts:  60
Joined:  2008-06-16
 

does anyone have an idea how to solve that issue?
it does not look like a constraint.. and several people have the same issue. just a rename of a table.

app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” - SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./test_magento/#sql-9df_3552e’ to ‘./test_magento/sales_flat_order_item’

edit: i have just seen that is is the result of a foreign key issue
http://coralf.wordpress.com/2009/06/11/mysql-bugs-and-error-1025-argh/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

@hammock_vienna::

I would like to report that I to have had this error, but I have also gotten past it by increasing my max_exec time and my apache timeout and making sure my server had full resources to perform the upgrade.

It seems it mainly happens quite a long time into the upgrade.

I have also gotten around it by simply restarting the upgrade.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cerebrum
Sr. Member
 
Avatar
Total Posts:  82
Joined:  2009-02-16
Sao Paulo
 

I followed the procedures described in

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/magento_1.5_to_1.6_upgrade

Which could make the upgrade, however when running the following command

php shell/indexer.php reindexall

I get the following return

Product Attributes index was rebuilt successfully
Product Prices index was rebuilt successfully
An error occurred while saving the URL rewrite
Product Flat Data index was rebuilt successfully
Category Flat Data index was rebuilt successfully
Category Products index was rebuilt successfully
Sistema de Busca index was rebuilt successfully
Tags dos Produtos index was rebuilt successfully
Situação do Estoque index was rebuilt successfully

Analyzing the log is stored as follows exception.log

---

2011-09-06T00:21:34+00:00 ERR (3):
exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘category/16-1-12’ for key ‘UNQ_CORE_URL_REWRITE_ID_PATH_IS_SYSTEM_STORE_ID’’ in /var/www/cerebrum/magento/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/cerebrum/magento/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /var/www/cerebrum/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/cerebrum/magento/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/cerebrum/magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /var/www/cerebrum/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO `co...’, Array)
#5 /var/www/cerebrum/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO `co...’, Array)
#6 /var/www/cerebrum/magento/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO `co...’, Array)
#7 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Resource/Url.php(283): Zend_Db_Adapter_Abstract->insert(’core_url_rewrit...’, Array)
#8 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(290): Mage_Catalog_Model_Resource_Url->saveRewrite(Array, NULL)
#9 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(317): Mage_Catalog_Model_Url->_refreshCategoryRewrites(Object(Varien_Object), ‘/’, false)
#10 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(458): Mage_Catalog_Model_Url->_refreshCategoryRewrites(Object(Varien_Object), NULL, false)
#11 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(252): Mage_Catalog_Model_Url->refreshCategoryRewrite(’3’, ‘12’, false)
#12 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(246): Mage_Catalog_Model_Url->refreshRewrites(’12’)
#13 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Indexer/Url.php(249): Mage_Catalog_Model_Url->refreshRewrites()
#14 /var/www/cerebrum/magento/app/code/core/Mage/Index/Model/Process.php(159): Mage_Catalog_Model_Indexer_Url->reindexAll()
#15 /var/www/cerebrum/magento/app/code/core/Mage/Index/Model/Process.php(187): Mage_Index_Model_Process->reindexAll()
#16 /var/www/cerebrum/magento/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#17 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#18 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’reindexProcess’)
#19 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /var/www/cerebrum/magento/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#21 /var/www/cerebrum/magento/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#22 /var/www/cerebrum/magento/index.php(80): Mage::run(’’, ‘store’)
#23 {main}

Next exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘category/16-1-12’ for key ‘UNQ_CORE_URL_REWRITE_ID_PATH_IS_SYSTEM_STORE_ID’’ in /var/www/cerebrum/magento/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /var/www/cerebrum/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/cerebrum/magento/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/cerebrum/magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /var/www/cerebrum/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO `co...’, Array)
#4 /var/www/cerebrum/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO `co...’, Array)
#5 /var/www/cerebrum/magento/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO `co...’, Array)
#6 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Resource/Url.php(283): Zend_Db_Adapter_Abstract->insert(’core_url_rewrit...’, Array)
#7 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(290): Mage_Catalog_Model_Resource_Url->saveRewrite(Array, NULL)
#8 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(317): Mage_Catalog_Model_Url->_refreshCategoryRewrites(Object(Varien_Object), ‘/’, false)
#9 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(458): Mage_Catalog_Model_Url->_refreshCategoryRewrites(Object(Varien_Object), NULL, false)
#10 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(252): Mage_Catalog_Model_Url->refreshCategoryRewrite(’3’, ‘12’, false)
#11 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Url.php(246): Mage_Catalog_Model_Url->refreshRewrites(’12’)
#12 /var/www/cerebrum/magento/app/code/core/Mage/Catalog/Model/Indexer/Url.php(249): Mage_Catalog_Model_Url->refreshRewrites()
#13 /var/www/cerebrum/magento/app/code/core/Mage/Index/Model/Process.php(159): Mage_Catalog_Model_Indexer_Url->reindexAll()
#14 /var/www/cerebrum/magento/app/code/core/Mage/Index/Model/Process.php(187): Mage_Index_Model_Process->reindexAll()
#15 /var/www/cerebrum/magento/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#16 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#17 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’reindexProcess’)
#18 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /var/www/cerebrum/magento/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#20 /var/www/cerebrum/magento/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#21 /var/www/cerebrum/magento/index.php(80): Mage::run(’’, ‘store’)
#22 {main}

---

Also the same error occurs when trying to re-index the index of ‘rewriting url’

How to apply fix for this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top