Facebook fans

Latest from Twitter

Magento upgrade from 1.5.1 to 1.6.0

Posted date: 22 Aug 2011 | Posted by: admin | 10 comments

Magento 1.6 stable version has been released. Lots of fixes has been done in this major release. Then it’s the time you will need to upgrade your Magento website to the lastest version.

In this tutorial, i will show you how to upgrade Magento from 1.5.1.0 to 1.6.0 via command line.

chmod 700 ./mage

./mage mage-setup .
./mage install community Mage_Downloader –force
./mage install community Mage_All_Latest –force

chmod 700 ./mage

./mage sync-pear
./mage list-installed
./mage list-upgrades
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest –force

chmod 700 ./mage

./mage config-set preferred_state beta
./mage list-installed
./mage list-upgrades

Note:

  1. At any step, if you get the error message “bash: ./mage: Permission denied”, please try to use this command: “chmod 700 ./mage” from command line again.
  2. After doing all above steps, remember to clear all caches:
    rm -rf /var/cache session
    and reindex all tables:
    ./shell php indexer.php reindexall
  3. After clearing all caches and reindexing all tables, if you get some error messages about data integration among tables like:

    a:5:{i:0;s:268:”Error in file: “/path_to_the_root_folder/app/code/core/Mage/Eav/sql/eav_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” – SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./your_database/customer_entity_text’ to ‘./your_database/#sql2-5ef-3a9′ (errno: 152)”;i:1;s:1080:”#0 /path_to_the_root_folder/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(‘Mage_Core’, ‘Error in file: …’)

    a:5:{i:0;s:268:”Error in file: “/path_to_the_root_folder/app/code/core/Mage/Eav/sql/eav_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” – SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./your_database/customer_entity_text’ to ‘./dev_migento/#sql2-5ef-3a9′ (errno: 152)”;i:1;s:1080:”#0 /path_to_the_root_folder /app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(‘Mage_Core’, ‘Error in file: …’)
    Please open the /app/etc/config.xml file and change the initStatements note from

    <initStatements>SET NAMES utf8</initStatements>

    to

  4. 
    
    <initStatements>SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0; 
    SET UNIQUE_CHECKS=0;</initStatements>

It's useful? Like this article!

10 Responses to “Magento upgrade from 1.5.1 to 1.6.0”

  1. August 23, 2011 at 4:06 am

    nice explanation !!

  2. silverslugger
    August 26, 2011 at 2:29 pm

    Hi. I have tried everything as listed here and elswhere, but I still get the 1025 Error on rename of error. Any other suggestions?

    • admin
      August 27, 2011 at 2:09 am

      @silverslugger: I think your error means your server ran out of resources, either memory or space, you need to increase your time out or upgrade from SSH

  3. August 26, 2011 at 4:10 pm

    Thanks for the post! Well it is finally out, but I’m not exactly all that enthused to see what new bugs have arisen. The bugs that were corrected are great, but every update you wait to see what new problems are gonna come up. It’s like Pandoras Box every time. You’re hopeful the inside of the box holds some treasure, which it does, but theres also a whole lot trouble waiting to come from it as well….

    Magento Development

    • admin
      August 28, 2011 at 5:08 pm

      @Magento 1.6:
      Well, it’s free and it’s open source. It will consists of never ending bugs. Let’s go and enjoy and start finding other issues, exceptions and bugs, contribute to make Magento better!

  4. silverslugger
    August 27, 2011 at 2:14 am

    @ admin
    I did all of this via SSH and my resource limits are set fairly high and have plenty of disc space.
    php_memory = 4096
    php_value max_execution_time 360000

    I am really anxious to get this working. Any additional help would be appreciated. Any other ideas that I can try?

    • admin
      August 28, 2011 at 4:40 pm

      @silverslugger:
      Don’t really know php_memory is good to use, may be you can try other methods for increasing the amount of memory a PHP script may consume:

      1. If you have access to your PHP.ini file, change the line in PHP.ini
      If your line shows 32M try 64M:
      memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

      2. If you don’t have access to PHP.ini try adding this to an .htaccess file:
      php_value memory_limit 64M

      And if you still get the error message, may be put the link to your site and i will have a look.

  5. silverslugger
    August 28, 2011 at 11:48 pm

    @ admin

    php_memory was just the value reported by phpinfo.
    This is what my /etc/phi.ini has for resource limits

    max_execution_time = 99000
    max_input_time = 99000
    memory_limit = 4096M

    This is my magento htaccess
    php_value memory_limit 256M
    php_value max_execution_time 360000

    Is there anyway to pm the link?

  6. August 30, 2011 at 4:18 am

    Replacing the following lines in app/code/core/Mage/Core/sql/core_setup/4-upgrade-1.5.9.9-1.6.0.0.php

    “$installer->run(”
    ALTER TABLE `{$installer->getTable(‘design_change’)}` DROP FOREIGN KEY `FK_DESIGN_CHANGE_STORE`;
    ALTER TABLE `{$installer->getTable(‘design_change’)}`
    ADD CONSTRAINT `FK_DESIGN_CHANGE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$installer->getTable(‘core_store’)}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE;
    “);”

    with

    $installer->getConnection()->dropForeignKey($installer->getTable(‘design_change’), ‘FK_DESIGN_CHANGE_STORE’);
    $installer->getConnection()->addConstraint(
    ‘FK_DESIGN_CHANGE_STORE’,
    $installer->getTable(‘design_change’), ‘store_id’,
    $installer->getTable(‘core_store’), ‘store_id’
    );

    will help.

Share this

Related posts

Pinterest Fan Box – Add Pinterest Followers to your Magento site image

Pinterest Fan Box, do you know how to add your Pinterest...

7 Apr 2012
Pinterest Feeds – Add Pinterest Pin Board to Magento Site image

Pinterest Feeds to Magento sites, how to do the...

23 Mar 2012
Pinterest Magento Linker image

Pinterest is one of the hottest social networks and is...

14 Mar 2012
Debugging magento templates image

Developing in Magento without these debugging tips can be...

14 Oct 2011

Mirage Design @ 2011 | Web development, Website design, Magento development, Wordpress development

Pinterest Tutorial   Ty so bong da   Tim chung cu