cancel
Showing results for 
Search instead for 
Did you mean: 

What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

I am new to magento/php. I trying to upgrade an existing website to Magento version 1.9.

I followed the following articular: Steps to Upgrade magento

I had following errors:

 

enter image description hereenter image description here

 

 

Couldn't succeed. I don't know the reason for this. Can anyone explain why these exceptions (see above) occurred?

Then I followed following: Magento guide for upgrade

This also didn't help. After trying too many times with different approaches, I am having following error while trying to upgrade my old database to latest magento version:

 

a:5:{i:0;s:340:"SQLSTATE[42000]: Syntax error or access violation: 1064 
You have an error in your SQL syntax; check the manual that corresponds to your MySQL 
server version for the right syntax to use near '>SET NAMES utf8; SET 
FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0' at line 1, query was: >SET NAMES utf8; SET 
FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0;";i:1;s:1541:"#0 C:\wamp\www\MyTestdev\lib\Varien\Db\Statement\Pdo\Mysql.php(110):

 Please guide me in right direction. Thanks

 

10 REPLIES 10

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

what is your php version?

have you tried to upload magento 1.6 or 1.7 files to 1.5 folder, and upgrading it first?

then to 1.9.0, then after to 1.9.1

then upgrade all extensions, but it all depends on your customizations...

i remember it was easier to do. then check your error log.

------------
MagenX - Magento and Server optimization

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

Php version is 5.5.12.

 

I don't know how to upgrade to specific version of Magento using Magento-Connect.

 

Also I am trying to install cygwin on my windows system to upgrade to specific version.

 

Any ideas or suggestion regarding my approach?

 

Thanks

 

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

to upgrade magento to 1.7 first, youcan download magento versions from here:

http://www.magentocommerce.com/downloads/assets/{MAGENTO_VER}/magento-{MAGENTO_VER}.tar.gz

 

replace {MAGENTO_VER} with any version you need.

 

"unpack" function has changed.

const FORMAT_PARSE_HEADER = 'a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix/a12closer';

must be replaced:

const FORMAT_PARSE_HEADER = 'Z100name/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Z1type/Z100symlink/Z6magic/Z2version/Z32uname/Z32gname/Z8devmajor/Z8devminor/Z155prefix/Z12closer';

in downloader/lib/Mage/Archive/Tar.php

 

------------
MagenX - Magento and Server optimization

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

Hi,

Thanks for reply, I have made the changes as you have suggested. I am trying to upload the package file as you have suggested but I am getting following error/message:

 

No file was uploaded.

 For above I am using Mageno-Connect, after login into admin in browser.

 

I downloaded the code by following URL:

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

 This provided me a package [magento-1.6.0.0.tar.gz]. Then, I tried to upload this package in Magento-Connect ad got the above mentioned error.

 

Can you tell me is there a way to upload any package using SSH command. I also have set cygWin. So if I could run a command like 

./mage install http://connect20.magentocommerce.com/community Mage_All_Latest -Version 1.6.0.0 --force

 is possible?

 

Thanks

 

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

you either has to fix this file:

downloader/lib/Mage/Archive/Tar.php

and use connect manager.

 

or extract and overwrite magento files with newer version.

------------
MagenX - Magento and Server optimization

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

Actually I made the change as you suggested in downloader/lib/Mage/Archive/Tar.php file, but still the same issue. Now I have copied the code over 1.5 form 1.6 version, after running following MYSQL  query:

TRUNCATE TABLE `report_compared_product_index` 

 I managed to run it, but now i am having following error:

 

 Fatal error: Call to undefined method Mage_Catalog_Helper_Data::getOldFieldMap() in C:\wamp\www\magento_16\app\code\core\Mage\Catalog\Model\Product.php on line 128

 I have checked this method exists in \app\code\core\Mage\Catalog\Helper\data.php file. I guess in this way I have to fix many incoming bugs Smiley Happy

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

Thanks for reply,

 

I finally maged to upgrade to version1.6.0.0 by manual upgrade. 

I copied the Style & theam related folders on version 1.6.0.0 code & copied the app/etc/local.xml file. Fixed the incoming DB issues (by checking logs)

Then fixed some code changes that came after running the code & navigating on other pages.

 

Just let me know this way of upgrading is a correct way. By manually copy pasting the above folders in the new version of magento and then when i try to run the magento , i can see database is automatically upgraded by magento and can see the new version name in the admin panel.

 

Am i doing this correctly though i think i am because otherwise the site would have not functioned properly and would not have shown latest magento version in admin panel. i have managed to migrate from 1.6.0 to 1.6.2 as well now. i think, that way i will migrate further to 1.7 and then 1.8 and 1.9.

 

A bit of relief but let me know if this is what is supposed to be done?

 

Thanks

 

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

Now I have upgraded to version 1.7.0 & having following error while login into admin section:

 

call to a member function getusername on a non object in --\app\design\adminhtml\default\default\template\page\header.phtml on line 31

 The front-end is working fine, also I checked the /Downloader URL (it's displaying the upgraded version of Magento Conntec - 1.7).

 

I tried to clear cache & Session folders & also cleared Browser cache, but didn't work. Then I tried to remove the var folder & run the URL in browser but still no luck.

 

Any Ideas to resolve this issue?

I searched over net but found not single appropriate answer on this.

 

Thanks

Re: What is the correct way to upgrade Magento version 1.5.1.0 to 1.9 on windows machine

Well, solution for me to resolve the following error :

call to a member function getusername on a non object in --\app\design\adminhtml\default\default\template\page\header.phtml on line 31

 was I had to re-copied the whole code from downloaded 1.7.0 code into the upgraded code. 

& it worked.