TurnKey Linux Virtual Appliance Library

[Solved] Upgrading Magento (how to?)

L. Arnold's picture

Main Solution is numbered in the last set of replies.  What follows is the process of getting there.

 

I have been trying to move Magento build to 1.5.1 from 1.4.2. 

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/u...

 

Tips for a successful upgrade; Definitely dumping some stuff here. Not sure where it is really going right now.

  1. Backup your database

  2. - In Magento go to Admin, System → Tools → Backups

    1. (redundant -skipped because #2 above and  TKLBAM)- You can use PHPMyAdmin (but this may fail due to time-limits on php scripts)

    2. - (skipped) You can export in SSH by typing...

    3. - (skipped) mysqldump -u USER -p DBNAME > dump.sql

    4. - (skipped) Reimport using mysql -u USER -p DBNAME < dump.sql

  3. Backup all the code you modified yourself, and don’t forget to keep the original installation archive  (TKLBAM)

  4. Take care of saving the media directory that contains all the uploaded product/category images  (TKLBAM)

  5. Create a backup copy of app/etc/local.xml file  (DID THIS!)

  6. Download a new installation archive or run SVN update if you checked it out from the Magento repository

    • First added Subversion in order to gt a Download  - 

      Used: apt-get install subversion

      then ran the following:

      svn checkout http://svn.magentocommerce.com/source/branches/1.5

      Everything dropped into a new folder 1.5 in my Magento Folder. 

    •  

  7. Extract and upload all the files it contains to your server

    • I did this by moveing everything from /magento/1.5 Folder straight into /magento folder.

  8. Delete var/cache and var/session directories

  9. Point your browser to any Magento page

  10. Database upgrades should happen automatically

  11. You are done!

  • NO CHANGES SEEM TO HAVE OCCURRED.  I am still seeing 1.42 in the Page Footers.  Everything opens.  Only in Magento Connect does it seem that I have 1.5 extentions installed.  Tried Using Magento Connect to Upgrade full system earlier, but no luck.  ..

"Release Notes in Magento Folder indicate all the files did move.

==== 1.5.0.1 =====

=== Major Highlights ===

How to get the Upgrade to "Take"... I would imaging there needs to be a script be run to implement database cahnges (see #10 above).

Thanks in advance for any help.

L. Arnold

L. Arnold's picture

Tried similar with blank Magento Install, same result

Just downloaded the full 1.5.1 Tarball.

Installed new TKL Magento 11.1 build.

Before running anything I dropped the Tarball onto the Magento folder then expanded.

TKL FileManager warned that this might overwrite some files.

Now when I run Magento, it is still indicating version 1.42 in the Footer.  I don't believe this is TKL's footer, but rather the standard Magento Footer.

How to accomplish an upgrade?

L. Arnold's picture

Also, getting php-apc to work ??

Magento wants to have PHP-APC running but I can't get it to function after installing

apt-get install php-apc

(Page Loads blank, even after deleting cache and session files in Magento).

I was able to get APC to stick in the Patch version last fall.

Any thoughts?

L. Arnold's picture

Getting closer (APC and XCache??)

Somehow ./mage mage-setup wants both APC and XCACHE installed but they cannot coexist int he system (they do the same thing).

With XCache installed our site is at least working (not upgrading).

So, I have removed APC again (but still get a PHP, failed to load ...apc.so error when I reun mage-setup from ssh (get the same for XCache if APC is installed rather than Xcache.. PHP seems to want both)... but can't have both.

Though this is "part" of the issue, as noted earlier, cannot upgrade the raw build 1.4.2 out of the box w/ no attempted apc installs and removals inside it.

I cannot find reference to xcache or apc in any of my php.ini files  (3 of them)

L. Arnold's picture

Good News to Report on Magento Upgrade

I just came back at this from another angle and I have gotten the new system to show up intact (so far).

In SSH an Subversion from my /var/www folder

svn checkout http://svn.magentocommerce.com/source/branches/1.5

This created a Folder called /var/www/1.5

I Turned off Apache

Renamed /var/www/magento to /var/www/magento1.4

renamed /var/www/1.5 to /var/www/magento

FTP Copied to local magento/1.4  and local magento.1.5 folders both sets of :

/var/www/.../media

/var/www/.../downloader

/var/www/.../app/etc/local.xml

Renamed 1.5 version /media and /downloader to /media1.5 and /downloader1.5

FTP'd up to new (1.5 version Magento) the full 1.4 folders of /media and /downloader

/var/www/.../media/

/var/www/.../downloader/

and installed the nonexistant (assuming a new install is about to happen)

/var/www/.../app/etc/local.xml

Site is displaying as a footer:

Help Us to Keep Magento Healthy - Report All Bugs (ver. 1.5.0.1)

© 2011 (our company) All Rights Reserved.
 
------------------

uploaded to new magento folder

magento-cleanup.php  to get all my permissions working correctly.

Need to work on this some more: error is in my "Magento Connect" screen though all my extensions are there: 

		"If you wish to proceed downloading Magento packages online, please set all Magento folders to have writable permission for the web server user (example: apache) or set up FTP Connection on the Magento Connect Manager Settings tab."


Need to do a bunch of Testing...

(I did inadvertently get downloader to upgrad earlier, so this seems to be working better than one might expect:

Most files are now owned by root rather than www-data.  (CHOWN I suspect).  Hopefully that will do it.

I expect I have messed completely with "subversion" changing all these names and folders. 

CHOWN is first,  then Subversion

Need to also look at what sort of Cache may or may not be in place now...  The Data and the media and the Site are working though so far.

 

L. Arnold's picture

Extensions did not Move though the List is in Magento Connect

Back to the original Xcache Apc Conflict....

Magento Connect is throwing a Maintenance Flag but not allowing any meaning ful updates.

Will Run a TKLBAM restore to get back to where we were. 

Found a refernce to apc.so in conf.d that should allow a more traditional upgrade (discussed last week).

Don't follow the above path unless you just want to install your data to a fresh install.  Extensions are very problematic, as is Magento Connect and Upgrading, as we can see with all this.

L. Arnold's picture

SVN or WGET for Upgrade (Standing at the Brink)

Ok,  Some guidance would be appreciated now.

Magento upgrades are documented to be difficult.  Moving from 1.4.x to 1.5.01 seems exceedingly so because they are changing the "Magento Connect" process...  Most posts I am finding say "don't use" Magento Connect.  I referenced the use of SVN above, but many posts are recomending WGET as shiftwizard does on the final post (as of now) elsewhere in this forum at http://www.turnkeylinux.org/forum/general/20100916/tklpatch-magento

So, it seems that I have indeed installed Subversion to my Magento Directory.  SVN Status tells me that branch 1.5.0.1 is there, but I can see that I am still actually running 1.4.2.0.  Documents about how to use wget to "drop over" Magento to make a good upgrade are more to the point than build from scratch reference to SVN  (this does not seem to be the nature of SVN from my first view however).

What is the best way to "write" the 1.5.0.1 build over my 1.4.2.0 build without starting from scratch.  I like the idea of a simple SVN command (now that I have a Mass of files otherwise clogging my Magento Folder.

But before we go there, is it really correct that every folder has a folder of the same name directly instide it (as in /var/www/magento/app/app... or ...magento/var/var ).  These appear to be the SVN packages "ready for action"..  if so, how to engage them?

I have citations on how to use wget  (see Page 33-34) applying to versions 1.3 magento...   http://www.savantmultimedia.com/print/Magento%201.3%20PHP%20Developer%E2%80%99s%20Guide.pdf 

(however, they then say to issue this command which makes no sense to me -- I would think I want to issue a "overwrite command, but do so only on files that are not part of my working system, but rather just the core"

mv magento/* magento/.htaccess .

followed by chmod o+w...

I expect both routes can work.  I want to maintain my existing "extension" set which I have actually upgraded, so now it is just the Core that I want to overwrite.

Thoughts on how to proceeed?  Is there a one line SVN command that will put this in motion?

thanks in advance for any comments.

L. Arnold

L. Arnold's picture

Citation Set:

Command that installed SVN to Magento:

http://www.magentocommerce.com/svn

Checkout Command (several "probably want to" statements, but reference to "force" and spedify folder to overwrite that is not in above reference --  needs to be more specific as to what is needed)

http://inchoo.net/ecommerce/magento/installing-magento/

Shell Script to reset ownership on a directory and then commit all changes

http://thedrupalblog.com/shell-script-reset-permissions-and-commit-all-subversion-changes-directory

WGet Instructions:

http://www.magentocommerce.com/wiki/groups/227/installing_magento_via_shell_ssh

A few links to SVN instructions:

http://serverfault.com/questions/150641/how-to-use-ubuntu-lucid-server-as-svn-trac-server

http://artis.imag.fr/~Xavier.Decoret/resources/svn/index.html

I am mainly looking for the "how now" path, but it would be good to get this settled for the longer term as well.

-------

Exploring SVN help now;  probably better than most "linked citations" for what to do it seems.

svn help

svn help export

svn help import

svn help checkout

svn help checkin  (does not exist  -  wanting to undo my Checkout command and use force)

Others wanting to do the same:

http://stackoverflow.com/questions/2058617/magento-subversion-svn-getting-a-development-environment-started

Module Manager - seemingly aimed at the same problem:

http://code.google.com/p/module-manager/

SVN Redmin Upgrade discussion on TKL (20 some steps...)

http://www.turnkeylinux.org/forum/support/20100104/how-upgrade-redmine-087

L. Arnold's picture

used a TKLBAM restore to move from TKL 11.0 to 11.1 Magento Appl

If properly implemented a 11.2 (or 11.1.5.01 to use Magento Version terms) Magento to get over this hump.  Could definitely do the trick! (though TBO, I was not, as yet, tried to move another install from RC 11 to 11.1 via TKLBAM) -- this actually would move Magento from 1.4.1.1 to 1.4.2.0 in my understanding.

Is magento "Patch Manageable" in the TKL sense?

L. Arnold's picture

Success: svn upgrade with with Virgin TKL-Magento!

Well, it worked with a "raw" Magento system taking it up to 1.5.0.1 Magento.  (UPDATE:  Worked on our Full DATA Version Also..)

  1. Install Magento VM.
  2. Run TKLBAM to get it in  the system (backup for the sake of it)
  3. (I would like to try running TKL-BAM restore from Production Machine to get a Test Machine, but I am waiting for a terminally long Backup on the image I want).
  4. Open SSH: https://yourserver:12320
  5. install Subversion in SSH " apt-get install subversion" from Root Line
  6. cd /var/www
  7. (then issue the following command in its entirety (forget the link that I am seeing)

    svn export --force http://svn.magentocommerce.com/source/branches/1.5 magento

  8. Open Webmin https://yourserver:12321, then go to File Manager
  9. find /var/www/magento/var/sessions(delete all sessions)
  10. find /var/www/magento/var/cache (delete all cache) - but leave the folder intact
  11. cd /var/www
  12. chown -R www-data:www-data /var/www/magento  (so that Magento Connect lets you in)
  13. Upload to your Magento Root folder the file:  magento-cleanup.php which can be found on magentoconnect
  14. open http://yourserver/magento-connect.php

  15. back to filemanager (delete or rename magento-connect.php)

  16. open http://yourserver   (you need to wait a little bit for the Database to be updated)

So this worked for me on a "newly born" TKL Magento 11.1    (now time to try with our data sets, but the Backup is Still Running over there).

I am optimistic.  This is the Footer (finally) which tells us the Version it is actuall Running!  Magento Connect Manager is also up to date (1.5.0.1)

L. Arnold's picture

For Extensions, proceed immediately to Mag Conn. to Reinstall

In Settings, go to Magento Connect and reinstall (via menu dropdown) all listed extensions.

Nice new Interface...  Faster system too. Several bugs disappeared at first viewing.

Reinstall solved the initial crash that occurred prior to reinstall (actually had to force reboot Ubuntu prior to extension reinstall - having tried to open a control panel on one of the extensions)  Works now fine.

Over the Rubicon..  yes!  finally.

L. Arnold's picture

How to add "Solved" to the original Forum Post?

It would be good to turn the question into a statment, but I can seemingly only edit "replies".

Jeremy's picture

I've done it for you

But you can do it yourself, it's just that it's at the top of the first post of a thread (looks a little like a tab) rather than at the bottom (as it is with all the replies).

magento1.5.1 drupal extendion

I want to know if the drupal extension for Magento1.5.1 is available.

The name of the extension is

The name of the extension is Drupento. But i want to know if this extension is available for Magento1.5.1 version and if it is compatible with Drupal 7.

L. Arnold's picture

Bypassing SVN you can upgrade Magento with the following WGET

The quick way for a fast build (and to remove the overhead of SVN that I describe above)

After you install theTKL Magento Appliance --  proceed in Webshell(:12320)

Go to your www folder (var/www)

then issue the 1.5.1 or 1.6.1 command below

wget http://www.magentocommerce.com/downloads/assets/1.5.1.0/magento-1.5.1.0....

OR

wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-1.6.1.0....

then expand the file (do just one at a time!) so that they upgrade 1.4.2 into the correct folders.

go to

magento/var/cache   .. issue command..  rm -R *

magento/var/session.. issue command.  rm-R *

 

Then Be sure your Ownership is set up right so that Downloader (and I am sure more) will run

chown -R  www-data:wwwdata /var/www/magento

run magento-cleanup.php or something similar  (search the web for this).

Open the Magento Site.  Takes a while but should upgrade you to a Fresh Build.

Getting error when Upgrading Magento to 1.5.1

 

Hello I upgraded Magento to 1.5.1 and I have one major error, my Authorize.net is not working correctly. I’ve replaced the Authorize.net transaction key and API login but for some reason I keep getting error:

Payment transaction failed. 
Reason 
Gateway error: The merchant login ID or password is invalid or the account is inactive.

Checkout Type 
onepage

Please advise as to what I can do to try and resolve this issue?

 

http://www.magentodevelopmentindia.in   |  http://zaftechnology.com/magento-development.html

L. Arnold's picture

I would check Authorize.net or Magentocommerce.com

sounds like authorize.net has not fully cleared the account but it could be something with your dns etc.  generally api connections take a few tries...  see if you can get a paypal connection. or slme other api to work.  i have not used authorize.net...  sorry for the formatting.  my android wont even capitalize or do a line feed in this text box.

Getting error when Upgrading Magento?

 

We didn’t transfer the sales & orders in this instance – I’m not sure that they’re compatible at all with 1.4 off the top of my head, but give it a go. Maybe compare the relevant tables between a 1.4.* and your 1.3.2.4 ?
 

http://touchwebsitesolutions.com  | http://joomlawebsitedevelopment.net | http://websitedesignz.net

You can try this

You can try this solution:

    Locate table eav_attribute in phpmyadmin, which was related to catalog_eav_attribute. Located column position in table eav_attribute and dropped it.

    Clear all cache and reindexed all data

    Now visit front page. Now you might get a new error:

    SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘main_table.include_in_menu’ in ‘where clause’

    Locate and open file app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php

Comment out following line:267

->where(‘main_table.is_active = ?’, ’1′)
// ->where(‘main_table.include_in_menu = ?’, ’1′)
->order(‘main_table.position’);

You can find a step by step guide at: expertmagentodevelopers[dot]com/blog/how-to-upgrade-from-magento-1-6-1-to-1-7-0-using-connect-manager/

The above solution is based on my own experience.

Thanks,

Website Design

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)