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
Upgrade from 1.4.2 to 1.6
 
kurt2439
Jr. Member
 
Total Posts:  7
Joined:  2011-07-06
 

Error in file: “/usr/local/sites/client/magento_site/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘customer_form_attribute’ already exists

I tried upgrading this using a tutorial (http://turnkeye.com/blog/magento-upgrade-from-1-4-version-to-magento-1-5-magento-1-6/) from turnkeye to go from 1.4.1 -> 1.4.2 and then to 1.6 but after all the mage upgrading was complete, when I hit the website to upgrade the database I get errors about database tables that already exist and it appears to be running a database upgrade script for a version of magento before 1.4.2. I know this error is extremely common and I have seen many blogs posts about it and read all that I have found—I see no resolution besides starting a fresh install.

I’ve heard people say this can happen if a previous upgrade didn’t complete successfully but I don’t think that is the case here—it was a fresh install at 1.4.1. Anyone know why this is happening or how to fix it?

Why does Magento not supply an up to date upgrade guide??

Note: I also tried the upgrade by overwriting the 1.4.1 files via SSH with successive version of magento—always the same database errors though. If I remove the mysql-upgrade script that is failing, then another one fails in its place with a simliar ‘table already exists’ error.

Note 2: I also made sure I cleared /var/cache and /var/session and even tried reindexing. No success.

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

Try dropping and re-creating your database, then import your dump file back into it. Then start your install again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kurt2439
Jr. Member
 
Total Posts:  7
Joined:  2011-07-06
 

Thanks Brent.

I tried dropping the database, recreating, and reloading my dump before I upgraded from 1.4.1 to 1.4.2 successfully, but still had the same issue when upgrading to 1.6.

I then tried dropping/recreating/reloading the database at version 1.4.2 and upgrading to 1.6, but still the same issue. Ugh

Here is my upgrade process in case this shows signs of a problem:

1.4.1 to 1.4.2

cd magento_web_root
chmod 
-R 777 lib/PEAR
./pear mage-setup
./pear upgrade -f magento-core/Mage_All_Latest-stable
chmod 550 
./mage
./mage mage-setup
./mage sync
HIT WEB SITE—LOADS OK (no noticeable database upgrade before loading but perhaps it is quick?)

1.4.2 to 1.6

./mage config-set preferred_state stable
./mage upgrade-all --force
rm 
-rf var/cache var/session
HIT WEB SITE—database upgrade runs and then I get the original error I noted about a table already existing.
 
Magento Community Magento Community
Magento Community
Magento Community
 
jmandala
Jr. Member
 
Total Posts:  6
Joined:  2009-07-06
 

Can you post the entire error message?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kurt2439
Jr. Member
 
Total Posts:  7
Joined:  2011-07-06
 

There has been an error processing your request

Error in file: “/usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘customer_form_attribute’ already exists

Trace:
#0 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘1.4.0.0.7’, ‘1.6.0.0’)
#2 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’1.4.0.0.7’, ‘1.6.0.0’)
#3 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/App.php(408): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/App.php(336): Mage_Core_Model_App->_initModules()
#6 /usr/local/sites/client/shop-dev.client.com/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /usr/local/sites/client/shop-dev.client.com/index.php(80): Mage::run(’’, ‘store’)
#8 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
kurt2439
Jr. Member
 
Total Posts:  7
Joined:  2011-07-06
 

Can anyone confirm that if my code is supposedly upgraded to version 1.4.2 that the database version should indeed be 1.4.0.0.7 (as in the upgrade script it is trying to run)? I see there are upgrade scripts for version 1.4.0.8, 1.4.0.0.9, and 1.4.0.0.10. Is that the source of my problem? The DB version didn’t get configured correctly?

 
Magento Community Magento Community
Magento Community
Magento Community
 
w3sols
Jr. Member
 
Total Posts:  7
Joined:  2010-01-23
 

Friends,

Always Backup your store files and database before starting upgarde.

I just upgraded my magento to 1.6. Following are the issues i faced while upgrading:

1) First of all i tried to upgarde magento using magento connect manager, but id didn\’t work as for most of modules were skipped by connect manager with message no upgrade available or dependency errors.

2) After that i try to upgrade it by downloading complete 1.6 package from magentocommerce.com and upload all the files to my magento (website) directory through FTP client.

3) After all files were uplaoded, i run my website again from browser, but it did not work and i got some server timeout errors, so i fixed timeout errors by editing by nginx conf file.

4) After inreasing timeout in server conf file, i restarted the upgarde by again accessing my website url from browser.

5) This time, i get some mysql errors after approx. 1 hour and upgrade did n\’t work.

6) So, i dropped my magento database and restored it back from my dump which was taken before starting upgrade .

7) After restoring my shop data, i again started upgarde by accessing my website from browser, this time it took a long time (approx. 10 hours), for approx. 8 hours page kept on loading, so i did not stop/close my browser window assuming that my upgarde is going on.

8) After approx . 8 hours, upgrade was still not completes, but i tried to open my website in another browser and it worked, my store was sucessfully upgarded to 1.6.

9) I tested whole site after this, and everything is working fine. Hurray.

Hope this will help someone struggling with upgarde.

W3sols Team (w3sols.com)
We customize magento community edition

 
Magento Community Magento Community
Magento Community
Magento Community
 
kurt2439
Jr. Member
 
Total Posts:  7
Joined:  2011-07-06
 

Thanks for the info. I too had a similar experience when upgrading a previous magento site—the upgrade appeared to hang, but when I opened it in another window the store loaded and the upgrade appeared to be complete. So there is probably a bug somewhere in there. I agree about the Connect Manager as well—it doesn’t work well. When I did get it to work, it claimed to have upgraded the site but the footer on the admin page still had the old version so something didn’t complete. Frustrating.

Too bad there doesn’t appear to be a solution to the SQL errors we get during the upgrade. It has forced us to abandon the upgrade project for the time being.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fearanphoist
Jr. Member
 
Total Posts:  4
Joined:  2010-07-13
 
kurt2439 - 14 September 2011 05:49 AM

There has been an error processing your request

Error in file: “/usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘customer_form_attribute’ already exists

Trace:
#0 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘1.4.0.0.7’, ‘1.6.0.0’)
#2 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’1.4.0.0.7’, ‘1.6.0.0’)
#3 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/App.php(408): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /usr/local/sites/client/shop-dev.client.com/app/code/core/Mage/Core/Model/App.php(336): Mage_Core_Model_App->_initModules()
#6 /usr/local/sites/client/shop-dev.client.com/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /usr/local/sites/client/shop-dev.client.com/index.php(80): Mage::run(’’, ‘store’)
#8 {main}

did anyone find a fix to the above issue ?

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

Did you restart your install? If you restarted your install you are bound to get some errors like this. The best and safest course of action is to get a fresh dump of you data base and restart the install. Remember to drop the database before you restore again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  386
Joined:  2009-07-25
India
 

Dropping and recreating will always get this error, whatsover, since we are trying to import the same database onto a black database, right ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thejosh13
Sr. Member
 
Total Posts:  252
Joined:  2008-06-23
 
w3sols.com - 22 September 2011 06:45 PM

Friends,

Always Backup your store files and database before starting upgarde.


I just upgraded my magento to 1.6. Following are the issues i faced while upgrading:

1) First of all i tried to upgarde magento using magento connect manager, but id didn\’t work as for most of modules were skipped by connect manager with message no upgrade available or dependency errors.

2) After that i try to upgrade it by downloading complete 1.6 package from magentocommerce.com and upload all the files to my magento (website) directory through FTP client.

3) After all files were uplaoded, i run my website again from browser, but it did not work and i got some server timeout errors, so i fixed timeout errors by editing by nginx conf file.

4) After inreasing timeout in server conf file, i restarted the upgarde by again accessing my website url from browser.

5) This time, i get some mysql errors after approx. 1 hour and upgrade did n\’t work.

6) So, i dropped my magento database and restored it back from my dump which was taken before starting upgrade .

7) After restoring my shop data, i again started upgarde by accessing my website from browser, this time it took a long time (approx. 10 hours), for approx. 8 hours page kept on loading, so i did not stop/close my browser window assuming that my upgarde is going on.

8) After approx . 8 hours, upgrade was still not completes, but i tried to open my website in another browser and it worked, my store was sucessfully upgarded to 1.6.

9) I tested whole site after this, and everything is working fine. Hurray.


Hope this will help someone struggling with upgarde.


W3sols Team (w3sols.com)
We customize magento community edition

I think this is the imporant information that I overlooked. When first trying to access the website in a browser the browser load wheel kept spining… it just takes a long time (hours) to update and needs to be left alone.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thejosh13
Sr. Member
 
Total Posts:  252
Joined:  2008-06-23
 

This link should have been posted on here, it helped me upgrade from 1.4.2 to 1.6.2 http://duntuk.com/magento-upgrade-15

 
Magento Community Magento Community
Magento Community
Magento Community
 
hazel_cl
Jr. Member
 
Total Posts:  13
Joined:  2010-10-16
 

I also had problems upgrading from 1.4.2 to 1.6, my problem was that I activated the Google shopping tool in Magento 1.4.2, the Google shopping tool made some major code changes to my install of Magento 1.4.2 after the default install was setup. When I tried to upgrade to 1.6.0 the install would fail, I had to go back and and reinstall 1.4.2 and then perform the upgrade.

One thing to check on is what extra modules you have installed onto Magento, a hidden code rewrite has taken place, that will cause your upgrade to fail.

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

I also had the same issue..
this blog helped me http://www.expertmagentodevelopers.com/blog/upgrade-magento-from-1-4-to-1-5-or-1-6/

 
Magento Community Magento Community
Magento Community
Magento Community
 
patrecord
Guru
 
Avatar
Total Posts:  461
Joined:  2008-06-01
 

Upgrade from 1.4.2 to 1.6.2 is an impossible mission!

We tried with connect and ssh many times but never solved. At the end of the story I solved using my db store as samle-data.

New installation on old db and reinstall of all extension. Now works!

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