<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TerraNetwork &#187; upgrade</title>
	<atom:link href="http://www.terranetwork.net/blog/tag/upgrade/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.terranetwork.net/blog</link>
	<description></description>
	<lastBuildDate>Mon, 19 Jul 2010 14:53:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upgrading Magento</title>
		<link>http://www.terranetwork.net/blog/2009/10/upgrading-magento/</link>
		<comments>http://www.terranetwork.net/blog/2009/10/upgrading-magento/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 21:58:11 +0000</pubDate>
		<dc:creator>Edith</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.terranetwork.net/blog/?p=186</guid>
		<description><![CDATA[We&#8217;ve been asked how easy it is to upgrade Magento. So, there I was thinking, hey &#8211; they&#8217;ve got this Magento Connect Manager, a few clicks and we&#8217;re done. Wrong. Very wrong. Go on to read the tale of the dreaded &#8220;500 Internal Server Error&#8221; problem (= your permissions are wrong), a small issue with [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been asked how easy it is to upgrade Magento. So, there I was thinking, hey &#8211; they&#8217;ve got this Magento Connect Manager, a few clicks and we&#8217;re done. Wrong. Very wrong. Go on to read the tale of the dreaded &#8220;500 Internal Server Error&#8221; problem (= your permissions are wrong), a small issue with Url.php and why not taking backups is really bad for your health.</p>
<p>The upgrade test was carried out on a standard Magento v1.3.0 install on a Linux with PHP5.2.9. Note that Magento does not allow gradual upgrades, at least not via the Magento Connect Manager. If you use the Manager, it&#8217;s all or nothing.</p>
<p><span id="more-186"></span></p>
<h3>Preparation</h3>
<p>Never, ever upgrade on a live site unless you really fancy a nervous break-down. The route to sanity is:</p>
<ul>
<li>a staging (test) environment, preferably on a separate domain to avoid all temptation of over-writing the wrong files</li>
<li>backups, backups, backups. Backups are like a life-vest &#8211; cumbersome until you really need them</li>
</ul>
<h3>Staging Environment: Upgrade</h3>
<p>Assuming you&#8217;re safely on your test/staging copy, access Magento Connect Manager by going in your browser to the &#8220;yourmagentoshop&#8221;/downloader/ folder or log into your Magento admin and go to &#8220;System -> Magento Connect -> Magento Connect Manager&#8221;. Click &#8220;check for upgrades&#8221;. If nothing happens and/or no upgrades show, then you probably installed Magento without the PEAR downloader. In order to get upgrades via Magento Connect to work, you need to enter &#8220;magento-core/Mage_All_Latest &#8221; in the extension key field. If at this stage all goes to pot, check my problem section below.</p>
<p>The Magento Knowledgebase says: <em>It is possible that you will see no extensions in MagentoConnect Manager. This means that you have just uploaded the files without using PEAR downloader. In that case enter magento-core/Mage_All_Latest in the extension key field and click Install button. This will install all latest MagentoConnect core packages on top of existing files and will allow future upgrades through MagentoConnect. </em>Source: <a href="http://www.magentocommerce.com/wiki/upgrading_magento">www.magentocommerce.com/wiki/upgrading_magento</a></p>
<p><img class="size-full wp-image-201" title="Magento Connect " src="http://www.terranetwork.net/blog/wp-content/uploads/2009/10/09-10-26-connect1.gif" alt="Magento Connect Manager" width="500" height="225" /></p>
<p><em><br />
1. Click ‘Select all upgradable extensions’<br />
2. Click ‘Commit changes’<br />
3. Watch the console progress for error messages<br />
4. After successfully upgrading click the ‘Refresh’ button that will appear under the console frame.<br />
</em></p>
<h3>Check your customisations / templates</h3>
<p>If you&#8217;ve come to this stage, it&#8217;s now a case of testing all your customisations to make sure they still work on the new version. I find scenarios a good help in this &#8211; have test routines such as purchasing, browsing etc which systematically test all key areas of your site.</p>
<h3>Apply to live site</h3>
<p>If you&#8217;ve tested, fixed anything that&#8217;s broken then you&#8217;re ready to apply to your live site. But only after you&#8217;ve taken that backup!</p>
<h3>Problem #1 Magento Connect &amp; Permissions</h3>
<p>If you did not install Magento via the PEAR downloader, then you first have to run the command magento-core/Mage_All_Latest through Magento Connect. And this will screw up your file/folder permissions rendering your entire site as one big &#8220;500 Internal Server Error&#8221;.<br />
Solution: Via the SSH client of your choice (e.g. Putty) run the following 2 commands:<br />
find ./ -type f -exec chmod 644 {} \;<br />
find ./ -type d -exec chmod 755 {} \;<br />
Sources: <a href="http://www.magentocommerce.com/boards/viewthread/9188/P15/#t56614">http://www.magentocommerce.com/boards/viewthread/9188/P15/#t56614</a></p>
<p><strong>UPDATE:</strong><br />
<a href="http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions">http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions</a> is the Wiki page. </p>
<p><img class="size-full wp-image-204" title="Putty" src="http://www.terranetwork.net/blog/wp-content/uploads/2009/10/09-10-26-putty-find.gif" alt="Putty" width="411" height="49" /></p>
<h3>Problem #2 turnOffSecretKey(Array ( ) )</h3>
<p>When I logged back into /downloader, all I got was: &#8220;Invalid method Mage_Adminhtml_Model_Url::turnOffSecretKey(Array ( ) )&#8221;.<br />
Solution: You need to manually overwrite app/code/core/Mage/Adminhtml/Model/Url.php with the latest version<br />
Sources: <a href="http://www.magentocommerce.com/boards/viewthread/9188/P15/#t56614">http://www.magentocommerce.com/boards/viewthread/38995/P15/#t127985</a></p>
<h3>Problem #3: Still no packages in admin??</h3>
<p>After solving problems #1 and #2 I felt on a roll. But hey, the version still said 1.3.0 in my admin. And the Connect Manager did not show a nice long list of stuff to update.<br />
Solution: So I ran magento-core/Mage_All_Latest again and this time, I got a nice long list of stuff without any Internal Server Errors and the upgrade was applied.</p>
<h3>Problem #4: Admin template / no drop-downs </h3>
<p>But when I returned to admin, the drop-downs weren&#8217;t working, rendering the admin inaccessible to me.<br />
Solution: I had to run the 2 SSH permission commands again. Although this time there was no &#8220;500 Internal Server Error&#8221;, the problem was the same &#8211; wrong file permissions. </p>
<h3>Problem #5: Install error </h3>
<p>During the install, I also encountered the error: &#8220;ERROR: failed to write /var/www/html/magento2/skin/adminhtml/default/default/.tmpboxes.css: Non-static method PEAR_Installer_Role::factory() should not be called statically, assuming $this from incompatible contex&#8221;.<br />
Seems a bug in the code, so no solution for this. </p>
<p><img src="http://www.terranetwork.net/blog/wp-content/uploads/2009/10/09-10-26-install-bug1.gif" alt="Magento Connect Bug" title="Magento Connect Bug" width="550" height="188" class="aligncenter size-full wp-image-222" /></p>
<h3>Concerns</h3>
<p>By running the upgrade via Magento Connect Manager I don&#8217;t know whether all files were successfully updated. The problem with the Url.php file was obvious, but a nagging doubt remains what other files were missed out without me knowing about it.</p>
<p>I&#8217;m also less than impressed that running an upgrade required solving 2 fatal errors, one of which rendered the entire site inaccessible and required SSH access to resolve (SSH access is standard on our hosting packages but some knowledge of command line will be required).</p>
<p>In summary, the upgrade experience confirms my belief that Magento is written for coders who don&#8217;t mind the odd command line, are happy to debug and have firm backup habits.</p>]]></content:encoded>
			<wfw:commentRss>http://www.terranetwork.net/blog/2009/10/upgrading-magento/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
