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 3
1.5.1.0 to 1.6 error: mysql4-upgrade-1.5.9.9-1.6.0.0.php
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Hello,

Seems that Magento upgrades still are a nightmare. Is this going to finish anytime?

Upgrading from 1.5.1.0 to 1.6. Nexcess SIP plan. Multistore envirnoment. Using SSH access. Staging store. No need to ask if cache has been cleared, permissions are ok, htaccess removed, etc. We have a loooong experience in upgrading Magento.

Each upgrade, a surprise.

a:5:{i:0;s:236:"Error in file: "/chroot/home/user/domain.com/html/staging/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-4' for key 2";i:1;s:1176:"#0 /chroot/home/user/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /chroot/home/user/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.0.14', '1.6.0.0')
#2 /chroot/home/user/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.0.14', '1.6.0.0')
#3 /chroot/home/user/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /chroot/home/user/domain.com/html/staging/app/code/core/Mage/Core/Model/App.php(408): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /chroot/home/user/domain.com/html/staging/app/code/core/Mage/Core/Model/App.php(336): Mage_Core_Model_App->_initModules()
#6 /chroot/home/user/domain.com/html/staging/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /chroot/home/user/domain.com/html/staging/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";}

Tried this:

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

It is no possible to enter admin area.

Any ideas? Thank you very much.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rossmannsupply
Member
 
Total Posts:  34
Joined:  2011-03-29
 

Same issue here. On and off. :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
Quaeso
Guru
 
Avatar
Total Posts:  334
Joined:  2010-04-03
 

same issue here too

 
Magento Community Magento Community
Magento Community
Magento Community
 
Quaeso
Guru
 
Avatar
Total Posts:  334
Joined:  2010-04-03
 

I have solve it, refresh your site with “F5”, maybe you must do it 2-3 times...try it

 
Magento Community Magento Community
Magento Community
Magento Community
 
rossmannsupply
Member
 
Total Posts:  34
Joined:  2011-03-29
 
Quaeso - 28 August 2011 10:51 AM

I have solve it, refresh your site with “F5”, maybe you must do it 2-3 times...try it

That doesn’t work here. I’d love a solution to this problem, it is the last error keeping my site from running. I am used to barrages of errors when I update Magento but I am not used to a problem no one has solved yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
aaronwallace
Member
 
Total Posts:  59
Joined:  2011-07-18
 

you can try this:

http://www.expertmagentodevelopers.com/blog/how-to-upgrade-from-magento-1-5-1-to-magento-1-6-0/

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Thank you @aaronwallace,

Any suggestion not yet tested? The change in the /app/etc/config.xml file doesn’t change anything.

 
Magento Community Magento Community
Magento Community
Magento Community
 
UnderDogg
Member
 
Total Posts:  63
Joined:  2011-06-25
 
tradiArt - 29 August 2011 08:23 AM

The change in the /app/etc/config.xml file doesn’t change anything.

Really? This code:

<initStatements>SET NAMES utf8SET FOREIGN_KEY_CHECKS=0SET UNIQUE_CHECKS=0;</initstatements>
disables checks on foreign keys and unique keys (apart from setting the code page for the table of course).
Your error is a violation of unique key if i’m not mistaking.
Open up app/code/core/Mage/Core/Model/Resource/Setup.php and go to line 645
I’m interested in the piece of code 5 lines above and 5 lines under line 645
If you see an entire function that ends for example 6 lines under line 645, copy that function.
If you’re able to execute a mysql statement in phpmyAdmin, that would be the next step.
 
Magento Community Magento Community
Magento Community
Magento Community
 
Otavio
Member
 
Total Posts:  70
Joined:  2008-09-12
 

Hey!

I got something similar to your error. Except that mine is that there is some error in catalog_product_index_website.
I’m afraid of creating some tables in phpmyadmin and creat it the wrong way.

a:5:{i:0;s:216:"Error in file: "/chroot/home/mysite/dev.mysiterts.com/html/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" - Column "date" does not exists on table "catalog_product_index_website"";i:1;s:1156:"#0 /chroot/home/mysite/dev.mysiterts.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /chroot/home/mysite/dev.mysiterts.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.0.44', '1.6.0.0.5')
#2 /chroot/home/mysite/dev.mysiterts.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.0.44', '1.6.0.0.5')
#3 /chroot/home/mysite/dev.mysiterts.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /chroot/home/mysite/dev.mysiterts.com/html/app/code/core/Mage/Core/Model/App.php(408): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /chroot/home/mysite/dev.mysiterts.com/html/app/code/core/Mage/Core/Model/App.php(336): Mage_Core_Model_App->_initModules()
#6 /chroot/home/mysite/dev.mysiterts.com/html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /chroot/home/mysite/dev.mysiterts.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";}

Still didn’t find any solution

 
Magento Community Magento Community
Magento Community
Magento Community
 
Cryptkeeper
Jr. Member
 
Total Posts:  3
Joined:  2008-11-19
 

Hi, I solved the by clearing out the files in /var/cache, var/lock and /var/sessions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ctrol
Member
 
Total Posts:  43
Joined:  2010-10-22
 
UnderDogg - 30 August 2011 10:52 PM

tradiArt - 29 August 2011 08:23 AM
The change in the /app/etc/config.xml file doesn’t change anything.

Really? This code:

<initStatements>SET NAMES utf8SET FOREIGN_KEY_CHECKS=0SET UNIQUE_CHECKS=0;</initstatements>
disables checks on foreign keys and unique keys (apart from setting the code page for the table of course).
Your error is a violation of unique key if i’m not mistaking.
Open up app/code/core/Mage/Core/Model/Resource/Setup.php and go to line 645
I’m interested in the piece of code 5 lines above and 5 lines under line 645
If you see an entire function that ends for example 6 lines under line 645, copy that function.
If you’re able to execute a mysql statement in phpmyAdmin, that would be the next step.

This way solved my problem.
But another error occur:

SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active.  Consider using PDOStatement::fetchAll().  Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.

do any one got a key ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Is there any solution for this problem already?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 
lilima - 17 October 2011 03:29 AM

Looks like, you tried upgrading your Magento from Magento Connect, which is the
most dangerous way to do.

No, I’m upgrading via SSH.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

Did you try ver 1.6.1.0-rc1?
Yes, it is a rc version, not a stable version. And we hope that magento team can publish the v1.6.1 stable version in the coming month.

We tried to upgrade from v1.5.0.1 to v.1.6.1.0-rc1 without any db-index/db-key issue, even we didn’t re-index magento before the upgrading. I think you should try the rc version if you still had trouble with v.1.6.0.

The only crazing thing was that it took us 6 hours waiting for the upgrading end. Sometimes I thought maybe I was crazy to be patient for that. :(

tradiArt - 07 October 2011 11:48 PM

Is there any solution for this problem already?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 
hankzh - 17 October 2011 08:08 AM

Did you try ver 1.6.1.0-rc1?

I have to admit that I haven’t tested since August, so no, haven’t tried with RC. Will do. grin

hankzh - 17 October 2011 08:08 AM

The only crazing thing was that it took us 6 hours waiting for the upgrading end. Sometimes I thought maybe I was crazy to be patient for that. :(

Really?? Six hours? Which size is your database? How do you know the process is finished and when?

Thank you hankzh!

 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

You are welcome.

And yes, it was six hours. Our database size is about 3.0G. For some other tasks, we didn’t look into how to short the upgrade time during a live environment yet.
“How do you know the process is finished and when?”
We kept checking (every half an hour) the Mysql’s processing list. During the upgrading, most of time it shows drop or add key/index. So we knew the upgrading is still running or not.

tradiArt - 17 October 2011 08:23 AM

hankzh - 17 October 2011 08:08 AM
Did you try ver 1.6.1.0-rc1?

I have to admit that I haven’t tested since August, so no, haven’t tried with RC. Will do. grin

hankzh - 17 October 2011 08:08 AM

The only crazing thing was that it took us 6 hours waiting for the upgrading end. Sometimes I thought maybe I was crazy to be patient for that. :(

Really?? Six hours? Which size is your database? How do you know the process is finished and when?

Thank you hankzh!

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