<?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>zytzagoo's den. &#187; Webdev</title>
	<atom:link href="http://zytzagoo.net/blog/categories/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://zytzagoo.net/blog</link>
	<description>On life, web dev and everything in between.</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:00:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mediaelement.js wordpress plugin and bwp-minify (Better WordPress Minify) issue &#8212; what&#8217;s going on and how to fix it</title>
		<link>http://zytzagoo.net/blog/2012/02/03/mediaelement-js-wordpress-plugin-and-bwp-minify-better-wordpress-minify-issue-whats-going-on-and-how-to-fix-it/</link>
		<comments>http://zytzagoo.net/blog/2012/02/03/mediaelement-js-wordpress-plugin-and-bwp-minify-better-wordpress-minify-issue-whats-going-on-and-how-to-fix-it/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 18:00:32 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=401</guid>
		<description><![CDATA[While working on a largeish WordPress powered site recently (yeah, the advertising is abysmal but I can&#8217;t really do anything about it), I stumbled upon an issue with bwp-minify and mediaelement.js plugins. When using them both, video playback on certain platforms/browsers doesn&#8217;t work. Read on to find out what&#8217;s going on and how to apply [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a <em>largeish</em> <a href="http://www.story.hr">WordPress powered site</a> recently (yeah, the advertising is abysmal but I can&#8217;t really do anything about it), I stumbled upon an issue with <a href="http://wordpress.org/extend/plugins/bwp-minify/">bwp-minify</a> and <a href="http://wordpress.org/extend/plugins/media-element-html5-video-and-audio-player/">mediaelement.js</a> plugins. When using them both,  video playback on certain platforms/browsers doesn&#8217;t work. Read on to find out what&#8217;s going on and how to apply a simple fix for the issue.</p>
<h2>Setup</h2>
<ul>
<li>A wordpress-powered site with bwp-minify and mediaelement.js wordpress plugins installed and activated</li>
<li>A [video src="whatever.mp4"] file inserted in a post/page which ends up falling back to the <code>flashmediaelement.swf</code> or <code>silverlightmediaelement.xap</code> component for whatever reason (no native &lt;video&gt; browser support, video format requires it, explicitly specified&#8230;) &#8212; <a href="http://mediaelementjs.com/#devices">can happen often, actually</a></li>
<li>bwp-minify (possibly other minifier plugins too) defaultly configured so that it ends up modifying/filtering mediaelement plugin&#8217;s <code>&lt;script src="..."&gt;</code> attribute (in order to correctly point the .js file to the minifier/gzip component)</li>
</ul>
<h2>Result</h2>
<p>No video playback :/<br />
The reason being that mediaelement.js ends up trying to load the <code>.swf/.xap</code> file through the bwp-minify plugin.</p>
<h2>Why</h2>
<p>Mediaelement.js&#8217;s default handling of the <code>pluginPath</code> option scans loaded <code>&lt;script&gt;</code> elements on the page for known filenames (in <code>mejs.Utility.getScriptPath()</code>) and appends the required playback plugin component filename to the found script path.</p>
<p>So, due to bwp-minify doing what it does, we end up with a flash object/embed which fails to load the required  <code>flashmediaelement.swf</code> (same thing happens with the silverlight counterpart).</p>
<h3>Possible workaround</h3>
<p>If you&#8217;re not the type of person to dig into the code and apply the simple fix described below, you can work around the issue by excluding mediaelement plugin&#8217;s .js files in bwp-minify options (and loose the benefits of automatic minification/gzip of mediaelement&#8217;s javascript and css files).</p>
<p>However, mediaelement.js has an option that can help us fix this, but it&#8217;s not being set in the current (2.5.0, currently also the latest) version of the wordpress plugin.</p>
<h2>The fix</h2>
<p>Modify <code>mediaelement-js-wp.php</code> plugin file to set the <code>pluginPath</code> option. This avoids running mediaelement.js&#8217;s <code>getScriptPath()</code> and explicitly sets the proper URL to the folder containing required flash and silverlight files.</p>
<p>Find this in 2.5.0 version of <strong>mediaelement-js-wp.php</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wp_mep_$mediaElementPlayerIndex'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>mediaelementplayer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	m<span style="color: #339933;">:</span><span style="color: #cc66cc;">1</span>
	<span style="color: #009900;">&#123;</span><span style="color: #000088;">$loop_option</span><span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#123;</span><span style="color: #000088;">$controls_option</span><span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#123;</span><span style="color: #000088;">$audio_size</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And replace with this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wp_mep_$mediaElementPlayerIndex'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>mediaelementplayer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	pluginPath<span style="color: #339933;">:</span><span style="color: #0000ff;">'{$dir}'</span>
	<span style="color: #339933;">,</span>m<span style="color: #339933;">:</span><span style="color: #cc66cc;">1</span>
	<span style="color: #009900;">&#123;</span><span style="color: #000088;">$loop_option</span><span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#123;</span><span style="color: #000088;">$controls_option</span><span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#123;</span><span style="color: #000088;">$audio_size</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Important!:</strong> If you&#8217;re going to copy-paste just the extra <code>pluginPath</code> line, don&#8217;t forget to also add the <strong>comma</strong> before the &#8216;m&#8217; key. If you have to ask why, perhaps you&#8217;re better off just using the workaround or waiting for a plugin update.</p>
<p>What we&#8217;re doing here is super-simple: the plugin already has a variable called <code>$dir</code> which contains the URL to the location of plugin files (and is using it for the same purposes elsewhere in the code) &#8212; we&#8217;re just re-using it to add an extra key to the generated Javascript configuration object. </p>
<p>I&#8217;d fork and submit a pull request, but I don&#8217;t think the wordpress plugin repo exists on Github (can&#8217;t find it).</p>
<p>Hopefully, the plugin author will include the fix in some future version, along with an updated mediaelement.js itself (wordpress plugin version is currently at 2.5.0, and the official mediaelement.js is at 2.6.5 &#8212; flash fullscreen feature along with a few <em>importanitish</em> bugs squashed would really be nice &#8212; until then, manual merge ftw!)</p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2012/02/03/mediaelement-js-wordpress-plugin-and-bwp-minify-better-wordpress-minify-issue-whats-going-on-and-how-to-fix-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CMYK you too. A rant. And nostalgic.</title>
		<link>http://zytzagoo.net/blog/2010/06/09/cmyk-you-too-a-rant-and-nostalgic/</link>
		<comments>http://zytzagoo.net/blog/2010/06/09/cmyk-you-too-a-rant-and-nostalgic/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 15:45:43 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=348</guid>
		<description><![CDATA[Felt like it today: CMYK you too. Really not digging the blog form lately. Especially not for rants and such &#8212; they really deserve their own little slice of heaven, custom styling, custom typography, always different, always new. And kind of &#8220;back-to-the-future&#8221;. With all the tweets, facebook updates, posterous, tumblrs and whatnot gaining traction and [...]]]></description>
			<content:encoded><![CDATA[<p>Felt like it today: <a href="http://zytzagoo.net/rant/cmyk-you-too/">CMYK you too</a>.</p>
<p>Really not digging the blog form lately. Especially not for rants and such &#8212; they really deserve their own little slice of heaven, custom styling, custom typography, always different, always new. And kind of &#8220;back-to-the-future&#8221;.</p>
<p>With all the tweets, facebook updates, posterous, tumblrs and whatnot gaining traction and becoming increasingly popular, I find myself missing &#8220;ye old days&#8221;. You know, the times when it all wasn&#8217;t mainstream. Back then it felt good being a part of something no one (quite yet) fully understood, but you had that feeling it&#8217;s important and BIG for some reason, and every day was something interesting and new.</p>
<p>Or I could just be getting &#8220;too old for this shit&#8221;. Love that phrase!</p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2010/06/09/cmyk-you-too-a-rant-and-nostalgic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The importance of peers at the work place</title>
		<link>http://zytzagoo.net/blog/2009/11/19/the-importance-of-peers-at-the-work-place/</link>
		<comments>http://zytzagoo.net/blog/2009/11/19/the-importance-of-peers-at-the-work-place/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 02:04:16 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Reality check]]></category>
		<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=307</guid>
		<description><![CDATA[tl;dr: What? I cannot stress how important it is to have someone to share your accomplishments / suffering with at work. Often overlooked, this is one of the most important feats to look for in your future employer&#8217;s offering. Make no mistake about it. Case in point I was having a really hard time today [...]]]></description>
			<content:encoded><![CDATA[<h2>tl;dr: What?</h2>
<p>I cannot stress how important it is to have someone to share your accomplishments / suffering with at work. Often overlooked, this is one of the most important feats to look for in your future employer&#8217;s offering. Make no mistake about it.</p>
<h2>Case in point</h2>
<p>I was having a really hard time today with some of Croportal&#8217;s partner feeds. Two unrelated issues came up, both having something to do with parsing Atom feeds using Zend_Feed:<br/><br/></p>
<ul>
<li>A certain site published it&#8217;s feed in Atom format using non-absolute URIs within the <code>&lt;content&gt;</code> element. That&#8217;s not a problem <em>per se</em>, since the spec allows it (and <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#atom.documents">defines</a> how to deal with that). However, Zend_Feed has no knowledge of what&#8217;s going on (and that&#8217;s probably ok, since it&#8217;s a general purpose lib). However, publishers place whatever HTML content they want within their <code>&lt;content&gt;</code> element and expect the same behaviour from aggregators as they get from browsers when they open their feed URLs in them (ie. Firefox). This means you have to do a shitload of &#8220;magic&#8221; on your end. And <strong>that shit ain&#8217;t trivial</strong>.</li>
<li>Another site published their feed using Atom as well, except they decided to use the (rarely used) <code>&lt;content type="xhtml"&gt;</code> feature of the Atom protocol. Which is all fine and dandy untill you actually have to pull the content and display it on your end (being an aggregator). The spec is <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.1.3.3">somewhat vague and yet pretty specific at the same time</a>. Except it doesn&#8217;t cover what to do in cases such as this:

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Paragraph with an <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;whatever.jpg&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><span style="color: #339933;">&lt;![CDATA[This is &lt;strong&gt;XHTML&lt;/strong&gt; content.]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...</pre></div></div>

<p>Which kind of sucks, since you&#8217;re on your own now. I have an actual publisher with such a feed. And the feed validates. What does one do? Well, you start introducing crap code into your codebase. Shit such as this, to handle the case described above:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">...</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'xhtml'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$item_simple</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_import_dom</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDOM</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$item_summary</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$item_simple</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">asXML</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// end-tag is fixed in form so it's easy to replace</span>
    <span style="color: #000088;">$item_summary</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;/content&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item_summary</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// remove start-tag, possibly including attributes and white space</span>
    <span style="color: #000088;">$item_summary</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&lt;content[^&gt;]*&gt;/i'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item_summary</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">...</span></pre></div></div>

<p>This sucks on so many levels it&#8217;s not even funny. Zend_Feed&#8217;s <code>$item->content()</code> method returns only the raw text, but my use case requires the surrounding elements as well (images etc). So, I hack my way around all this using SimpleXML which allows me to (somewhat) easily dump the structure into a somewhat acceptable form of HTML.</p>
<p>Of course, later on you have to call <code>strip_tags()</code> on content such as this (to display it safely on your end), but &#8212; surprise, surprise &#8212; you run into another issue: if you have a <code>&lt;![CDATA[</code> string anywhere within a larger string that you call <code>strip_tags()</code> on, you&#8217;re gonna get an empty string back as a result. How&#8217;s that for fun, eh? This is where you start pulling your hair out and thinking male prostitution ain&#8217;t such a bad line of work after all.</li>
</ul>
<p>Folks, I&#8217;m not making this shit up. This is real world PHP on a (relatively) large scale project.</p>
<h2>End result</h2>
<p>Several hours and hundreds of lines of code later &#8212; both issues are fixed. And everything works flawlessly. Except no one but me is aware of the fact. </p>
<p>No one in the entire company hasn&#8217;t got a fucking clue about what has transpired today. Or why shit like that matters. Or how much future money it has saved. Or that I&#8217;ve written an URL parser library that can be used generically for any possible scenario that deals with relative/absolute URL conversion, URL joining, URL parsing etc.</p>
<p>Worst of all, no one could hear (and understand) my cries about how horribly broken Zend_Feed, parse_url(), strip_tags(), DOM etc. are.</p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2009/11/19/the-importance-of-peers-at-the-work-place/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Solving The Existing UUID Error For Running Multiple IEs</title>
		<link>http://zytzagoo.net/blog/2009/04/05/solving-the-existing-uuid-error-for-running-multiple-ies/</link>
		<comments>http://zytzagoo.net/blog/2009/04/05/solving-the-existing-uuid-error-for-running-multiple-ies/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 02:05:37 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=247</guid>
		<description><![CDATA[Several readers reported running into troubles trying to install multiple VMs with different IE versions (following my previous howto). Installing one works just fine, but when you try to create another VM using another one of those Microsoft&#8217;s .vhd files you run into an error: VirtualBox is complaining about a hard disk with the same [...]]]></description>
			<content:encoded><![CDATA[<p>Several readers reported running into troubles trying to install multiple VMs with different IE versions (following my <a href="http://zytzagoo.net/blog/2009/03/20/howto-running-ie6-ie7-and-ie8-on-ubuntu-intrepid-810-using-virtualbox/">previous howto</a>). </p>
<p>Installing one works just fine, but when you try to create another VM using another one of those Microsoft&#8217;s .vhd files you run into an error: VirtualBox is complaining about a hard disk with the same UUID already existing and whatnot.</p>
<p>Having separate VMs for separate browser versions is a nice thing to have, but it&#8217;s not possible by default, because all of Microsoft&#8217;s .vhd files have the same UUID.</p>
<p>Here&#8217;s how we can work around that, until Microsoft decides to change UUIDs, or until Sun&#8217;s undocumented and unsupported command (VBoxManage internalcommands sethduuid &lt;file&gt;) starts working on .vhd images.</p>
<p><strong>Convert your .vhd images</strong></p>
<p>The process consists of converting our .vhd images (which are basically vpc images) into .vmdk images, which automagically gives them a new UUID.</p>
<p>First we install <a href="http://www.qemu.org/">Qemu</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> qemu</pre></div></div>

<p>After that, change into the directory holding your .vhd image and run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">qemu-img convert <span style="color: #660033;">-f</span> vpc image.vhd <span style="color: #660033;">-O</span> vmdk image.vmdk</pre></div></div>

<p>That&#8217;s it, now you can use the newly created .vmdk images as hard disks for your additional IE virtual machines. Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2009/04/05/solving-the-existing-uuid-error-for-running-multiple-ies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Running IE6, IE7 and IE8 On Ubuntu Intrepid (8.10) Using VirtualBox</title>
		<link>http://zytzagoo.net/blog/2009/03/20/howto-running-ie6-ie7-and-ie8-on-ubuntu-intrepid-810-using-virtualbox/</link>
		<comments>http://zytzagoo.net/blog/2009/03/20/howto-running-ie6-ie7-and-ie8-on-ubuntu-intrepid-810-using-virtualbox/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 14:35:45 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=175</guid>
		<description><![CDATA[Being able to check how stuff behaves in various versions of Internet Explorer is unavoidable. This (somewhat illustrated) HOWTO details what one must do in order to be able to easily test their stuff in various versions of Internet Explorer on Windows XP SP3 while still happily having only Ubuntu installed on their machine.]]></description>
			<content:encoded><![CDATA[<p><strong>Intro</strong></p>
<p>Being able to check how stuff behaves in various versions of Internet Explorer is unavoidable. Switching to Ubuntu recently made me painfully aware of that fact (again).</p>
<p>This (somewhat illustrated) HOWTO details what one must do in order to be able to easily test their stuff in various versions of Internet Explorer on Windows XP SP3 (without having to reboot, switch computers or paying someone else to do it) while still happily having only Ubuntu installed on their machine.</p>
<p>We&#8217;ll be using Sun&#8217;s <a href="http://www.virtualbox.org/">VirtualBox</a> software and Microsoft&#8217;s <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&amp;displaylang=en">Internet Explorer Application Compatibility VPC Images</a> so lets get on with it.</p>
<p><strong>Downloading and installing VirtualBox</strong></p>
<p>If you don&#8217;t like the closed-source idea, <a href="http://www.virtualbox.org/wiki/Editions">compare the differences</a> and try with the OSE version. Let me know how it goes.<br />
<strong>Update:</strong> <a href="#comment-1587">Phil&#8217;s results</a> aren&#8217;t pretty. If you&#8217;re also seeing BSODs, you might want to <a href="http://blogs.msdn.com/virtual_pc_guy/archive/2005/10/24/484461.aspx">try</a> <a href="#comment-1589">some</a> <a href="http://www.virtualbox.org/ticket/420">workarounds</a>.</p>
<p>If you&#8217;re comfortable with installing closed-source (binary) packages continue by adding Sun&#8217;s public key:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-q</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.virtualbox.org<span style="color: #000000; font-weight: bold;">/</span>virtualbox<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span>sun_vbox.asc <span style="color: #660033;">-O-</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-key</span> add -</pre></div></div>

<p>And adding the following line to /etc/apt/sources.list:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">deb http:<span style="color: #000000; font-weight: bold;">//</span>download.virtualbox.org<span style="color: #000000; font-weight: bold;">/</span>virtualbox<span style="color: #000000; font-weight: bold;">/</span>debian intrepid non-free</pre></div></div>

<p>Install VirtualBox, accepting prompts (to create the <strong>vboxusers</strong> group and compile the kernel module):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> virtualbox-<span style="color: #000000;">2.1</span></pre></div></div>

<p><img class="aligncenter size-full wp-image-196" title="virtualbox-install-done2" src="http://zytzagoo.net/blog/wp-content/uploads/2009/03/virtualbox-install-done2.png" alt="virtualbox-install-done2" width="549" height="486" /></p>
<p>Now add your user to the newly created <strong>vboxusers</strong> group:</p>
<p><img class="aligncenter size-full wp-image-188" title="vboxusers-properties" src="http://zytzagoo.net/blog/wp-content/uploads/2009/03/vboxusers-properties.png" alt="vboxusers-properties" width="420" height="300" /></p>
<p>GUI way: <em>System > Administration > Users And Groups > Unlock (type in your password) > Manage Groups > <strong>vboxusers</strong> > Properties</em>. Check the checkbox next to your username. Close all (not by cancelling though).</p>
<p>CLI way:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">groups</span> <span style="color: #000000; font-weight: bold;">&lt;</span>username<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #666666; font-style: italic;"># you will get a list of groups for that username</span>
useradd <span style="color: #000000; font-weight: bold;">&lt;</span>username<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">-g</span> <span style="color: #000000; font-weight: bold;">&lt;</span>first group <span style="color: #000000; font-weight: bold;">in</span> list<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">-G</span> <span style="color: #000000; font-weight: bold;">&lt;</span>second group<span style="color: #000000; font-weight: bold;">&gt;</span>,<span style="color: #000000; font-weight: bold;">&lt;</span>third group<span style="color: #000000; font-weight: bold;">&gt;</span>,...,vboxusers</pre></div></div>

<p>Reboot, or logout and log back in (might work). Reboot is the safe bet.</p>
<p><strong>Downloading and extracting Microsoft&#8217;s Virtual Hard Disk images (VHD)</strong></p>
<p>Current VHD images can be found here: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&amp;displaylang=en" target="_blank">http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&amp;displaylang=en</a> &#8211; the URLs will probably change (expire), but these VHDs should work until April 2009. I&#8217;m installing WindowsXP SP3 images, although Vista images are also available (check the previous link and explanations there for Vista).</p>
<ul>
<li><a title="IE8 Windows XP SP3 VHD" href="http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/IE8-XPSP3.EXE" target="_blank">IE8-XPSP3.EXE</a> (Internet Explorer 8 WindowsXP SP3 VHD)</li>
<li><a title="IE7 WindowsXP SP3 VHD" href="http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/IE7-XPSP3.exe" target="_blank">IE7-XPSP3.exe</a> (Internet Explorer 7 WindowsXP SP3 VHD)</li>
<li><a title="IE6 WindowsXP SP3 VHD" href="http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/IE6-XPSP3.exe" target="_blank">IE6-XPSP3.exe</a> (Internet Explorer 6 WindowsXP SP3 VHD)</li>
</ul>
<p>(yes, the last two have lower-cased extensions, who knows why)</p>
<p>Create a folder to store the VHDs and download the one you need:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> ~<span style="color: #000000; font-weight: bold;">/</span>VMs <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>VMs
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-bqc</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.microsoft.com<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>B<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>B72085AE-0F04-4C6F-<span style="color: #000000;">9182</span>-BF1EE90F5273<span style="color: #000000; font-weight: bold;">/</span>IE8-XPSP3.EXE</pre></div></div>

<p>Once they&#8217;re downloaded, extract them using unrar:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">unrar e IE8-XPSP3.EXE XP_SP3_IE8<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p><img class="aligncenter size-full wp-image-190" title="xp-sp3-ie8-extract" src="http://zytzagoo.net/blog/wp-content/uploads/2009/03/xp-sp3-ie8-extract.png" alt="xp-sp3-ie8-extract" width="521" height="163" /></p>
<p>You can delete the .exe files after extraction, they&#8217;re not needed any more.</p>
<p><strong>Creating the Virtual Machine</strong></p>
<p>Time to start VirtualBox (<em>Applications > System Tools > Sun xVM VirtualBox</em>). Create a new virtual machine by, you guessed it, choosing <em>New</em>. Name it and set the Operating System to Windows XP. </p>
<p><img src="http://zytzagoo.net/blog/wp-content/uploads/2009/03/virtualbox-vm-naming.png" alt="virtualbox-vm-naming" title="virtualbox-vm-naming" width="497" height="408" class="aligncenter size-full wp-image-214" /></p>
<p>Assign some RAM (keep it under half of your physical RAM). </p>
<p><img src="http://zytzagoo.net/blog/wp-content/uploads/2009/03/virtualbox-vm-memory.png" alt="virtualbox-vm-memory" title="virtualbox-vm-memory" width="497" height="408" class="aligncenter size-full wp-image-215" /></p>
<p>At the Virtual Hard Disk screen choose <em>Existing</em> to open the Virtual Media Manager. Choose <em>Add</em> and select the VHD file you extracted earlier. Choose <em>Select</em> to close the Virtual Media Manager. </p>
<p>Choose <em>Next</em>, then <em>Finish</em> and you&#8217;ll return to the main VirtualBox window which should now list your new Virtual Machine.</p>
<p><img src="http://zytzagoo.net/blog/wp-content/uploads/2009/03/virtualbox-vm-wizard-final-step.png" alt="virtualbox-vm-wizard-final-step" title="virtualbox-vm-wizard-final-step" width="497" height="408" class="aligncenter size-full wp-image-216" /></p>
<p><strong>Configuring the new Virtual Machine</strong></p>
<p>Optional: select it, then choose Settings (available on right-click as well). General should be preselected on the left, increase the Video Memory Size and enable 3D acceleration on the Basic tab. Click OK to close the Settings, and click Start to power up your new virtual machine.</p>
<p>Once it boots, cancel out any dialogs, prompts, windows, etc. </p>
<p>Go to <em>Devices > Install Guest Additions</em> (it&#8217;s in the window&#8217;s menu bar). Follow the prompts accepting defaults and you&#8217;ll have installed VirtualBox additions. When prompted, reboot the machine. If it doesn&#8217;t prompt you, go to <em>Machine > Reboot</em> (menu bar again).<br />
Once it reboots, click OK on the mouse pointer dialog thingy (you will not have to manually capture the mouse again, nice!).</p>
<p>Now go to <em>Start > Run</em> and paste the following in there:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">D:\VBoxWindowsAdditions-x86.exe <span style="color: #000000; font-weight: bold;">/</span>extract <span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">D</span>=C:\Drivers</pre></div></div>

<p>The above extracts some default drivers into the virtual machine&#8217;s c:\Drivers folder which we&#8217;ll need to set up the Ethernet adapter.</p>
<p>Now go to <em>Start > Administrative Tools > Computer Management</em> and select the <em>Device Manager</em> there. Navigate to <em>Network Adapters</em>, <em>Ethernet Controller</em>. Right click it and choose &#8220;<em>Update Driver&#8230;</em>&#8220;. Select &#8220;<em>Yes, now and every&#8230;</em>&#8221; and click <em>Next</em>. Select &#8220;<em>Install from a list or specific location</em>&#8220;, click <em>Next</em>. In the Location box paste in &#8220;C:\Drivers\x86\Network\AMD&#8221; or navigate to it manually. Click <em>Finish</em>.</p>
<p>You should have a working ethernet connection now. Fire up IE 8 and test it out!</p>
<p>Here&#8217;s a screenshot:<br />
<a target="_blank" href="http://zytzagoo.net/blog/wp-content/uploads/2009/03/ie8-on-virtualbox-ubuntu.jpg"><img src="http://zytzagoo.net/blog/wp-content/uploads/2009/03/ie8-on-virtualbox-ubuntu-300x187.jpg" alt="Screenshot of a Running IE8 install on Ubuntu using VirtualBox" title="Screenshot of a Running IE8 install on Ubuntu using VirtualBox" width="300" height="187" class="aligncenter size-medium wp-image-211" /></a></p>
<p>If all went well, we&#8217;re done here!</p>
<p><strong>Parting thoughts</strong></p>
<p>When closing the VM choose &#8220;Save the machine state&#8221; if you wish to avoid waiting for all those boot screens the next time you start the VM.</p>
<p>Virtualization rules.</p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2009/03/20/howto-running-ie6-ie7-and-ie8-on-ubuntu-intrepid-810-using-virtualbox/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>SMTP_Validate_Email &#8212; Email verification via SMTP written in PHP</title>
		<link>http://zytzagoo.net/blog/2009/02/01/smtp_validate_email-email-verification-via-smtp-written-in-php/</link>
		<comments>http://zytzagoo.net/blog/2009/02/01/smtp_validate_email-email-verification-via-smtp-written-in-php/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 13:06:51 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=132</guid>
		<description><![CDATA[Working on a recent project I noticed that about 20% of user&#8217;s accounts have not been fully activated (typos in email addresses and/or bounced activation emails being the main culprits). After trying out several solutions (and realizing none of them worked for me), here&#8217;s my solution (pasting and excerpt from the README): SMTP_Validate_Email &#8211; Perform [...]]]></description>
			<content:encoded><![CDATA[<p>Working on a recent project I noticed that about 20% of user&#8217;s accounts have not been fully activated (typos in email addresses and/or bounced activation emails being the main culprits). After trying out several solutions (and realizing none of them worked for me), here&#8217;s my solution (pasting and excerpt from the README):</p>
<p>SMTP_Validate_Email &#8211; Perform email address verification via SMTP.</p>
<p>The class retrieves MX records for the email domain and then connects<br />
to the domain&#8217;s SMTP server to try figuring out if the address is really valid.</p>
<p>Some features (check the source for more):</p>
<ul>
<li>Not really sending a message, gracefully resetting the session when done</li>
<li>Command-specific communication timeouts implemented per the relevant RFCs</li>
<li>Catch-all account detection</li>
<li>Batch mode processing supported</li>
<li>MX query support on Windows without requiring any PEAR packages</li>
<li>Logging and debugging support</li>
</ul>
<p>The source is over on Github: <a href="http://github.com/zytzagoo/smtp-validate-email">http://github.com/zytzagoo/smtp-validate-email</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2009/02/01/smtp_validate_email-email-verification-via-smtp-written-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The new rtl.hr &#8212; 0wned by yours truly</title>
		<link>http://zytzagoo.net/blog/2008/11/14/the-new-rtlhr-0wned-by-yours-truly/</link>
		<comments>http://zytzagoo.net/blog/2008/11/14/the-new-rtlhr-0wned-by-yours-truly/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 02:03:16 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Reality check]]></category>
		<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=87</guid>
		<description><![CDATA[The new RTL Hrvatska website has been redesigned recently. And re-coded. It&#8217;s looking fresh and whatnot, but I&#8217;m not gonna talk about the site&#8217;s design. Well, not visual design anyway. I&#8217;d like to talk about the importance of knowing what the f**k you&#8217;re doing if you&#8217;re getting paid to do it. Why? Here&#8217;s why: http://www.rtl.hr/data/zyt.was.here.html [...]]]></description>
			<content:encoded><![CDATA[<p>The new <a href="http://www.rtl.hr">RTL Hrvatska</a> website has been redesigned recently. And re-coded. It&#8217;s looking fresh and whatnot, but I&#8217;m not gonna talk about the site&#8217;s design. Well, not visual design anyway.</p>
<p>I&#8217;d like to talk about the importance of <strong>knowing what the f**k you&#8217;re doing if you&#8217;re getting paid to do it</strong>.</p>
<p>Why? Here&#8217;s why: <a href="http://www.rtl.hr/data/zyt.was.here.html">http://www.rtl.hr/data/zyt.was.here.html</a></p>
<p><a href="http://zytzagoo.net/blog/wp-content/uploads/2008/11/wwwrtlhrzytwashere.png"><img class="alignnone size-medium wp-image-88" title="RTL.hr remote code exploit executed" src="http://zytzagoo.net/blog/wp-content/uploads/2008/11/wwwrtlhrzytwashere-300x187.png" alt="" width="300" height="187" /></a></p>
<p>Big deal, eh? Well, here&#8217;s another gem:</p>
<pre><code>total 84
drwxrwxr-x  14 trikoder trikoder 4096 Nov 13 12:23 .
drwxrwxr-x   5 trikoder trikoder 4096 Sep  3 13:49 ..
-rw-rw-r--   1 trikoder trikoder  266 Nov 13 12:23 .htaccess
drwxrwxr-x  17 trikoder trikoder 4096 Sep 12 17:13 _templates
drwxrwxr-x   2 trikoder trikoder 4096 Sep  8 12:42 admin
</code><code>...</code></pre>
<p>That&#8217;s the begging of rtl.hr&#8217;s public_html directory listing in case you&#8217;re wondering. No, I don&#8217;t have FTP access. Yes, I did manage to run a remote code execution exploit. With nothing else but a web browser.</p>
<p>Takeaway lessons for the <a href="http://www.trikoder.net/">Trikoder</a> crew (the guys responsible for the new site):</p>
<ul>
<li>disable register_globals</li>
<li>keep your external libraries up to date!</li>
</ul>
<p>Good luck and Godspeed, you&#8217;ll need it!</p>
<p>P.S.<br />
The Trikoder crew has been contacted with full details on what&#8217;s wrong, how to fix it etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2008/11/14/the-new-rtlhr-0wned-by-yours-truly/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Chrome &#8211; first impressions</title>
		<link>http://zytzagoo.net/blog/2008/09/02/google-chrome-first-impressions/</link>
		<comments>http://zytzagoo.net/blog/2008/09/02/google-chrome-first-impressions/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 20:45:10 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=79</guid>
		<description><![CDATA[Just a quick braindump of my first impressions using Google Chrome. Download and install went smoothly. It tried importing Firefox settings, but required closing all Firefox instances to do so. So I skipped the import through a dialog or two. The installer automatically set all the language and regional settings to Croatian. Since croatian interface [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick braindump of my first impressions using Google Chrome.</p>
<p><a href="http://www.google.com/chrome">Download</a> and install went smoothly. It tried importing Firefox settings, but required closing all Firefox instances to do so. So I skipped the import through a dialog or two.</p>
<p>The installer automatically set all the language and regional settings to Croatian. Since croatian interface freaks me out, that had to be changed. The wrench icon is your friend here.</p>
<p>The UI is spiffy and smooth. Transitions occur (try pressing &#8220;ctrl + b&#8221;, show/hide the bookmarks bar). It&#8217;s probably a safe bet it&#8217;ll be skinnable at least to some extent.</p>
<p>The home button is hidden by default. Wierd. A trip to the options menu and that&#8217;s fixed:<br />
<img src="http://zytzagoo.net/blog/wp-content/uploads/2008/09/chrome-home-button-options.png" alt="" title="chrome-home-button-options" width="431" height="336" class="aligncenter size-full wp-image-83" /><br />
The home page is obviously going to be able to integrate google gadgets at some point. If it&#8217;s not already available&#8230;</p>
<p>I don&#8217;t see any &#8220;feed indicators&#8221; for pages that have RSS autodiscovery enabled. That sucks. No integrated feed reader either&#8230;<br />
Navigating to an RSS or XML feed produces raw unstyled feed contents. I&#8217;m suspecting Google Reader integration (or something to that effect) is in the works&#8230;</p>
<p>Once you start the app, two chrome.exe processes spawn, I&#8217;m guessing one is the master, and the other one is responsible for handling your first open tab. As soon as you type in an address, a third process spawns. Which is sweet, you can check each site&#8217;s memory usage separately, and this is gonna be useful.</p>
<p>If you maximize the chrome window, the small google logo (which is otherwise placed right next to the min/max/close window controls) disappears, and the window bar shrinks a bit vertically.</p>
<p>Flash works. Cool.<br />
Something is fishy with it, though. Noticing CPU usage spikes when hovering over flash content, gotta test more. Preliminary tests show it might be wmode=&#8221;transparent&#8221; related&#8230;</p>
<p>Since it&#8217;s based on Webkit, all the developer goodies are there: js debugger, dom inspector, resource inspector etc.)</p>
<p>Umm&#8230; double click on the window title bar maximizes the window. That&#8217;s expected. The problem is in my developed habit of double clicking right next to the current tab to create a new empty one.<br />
&#8220;Ctrl + t&#8221; keyboard shortcut works out of the box though.</p>
<p>The way that the domain name is differently colored is cool:<br />
<img src="http://zytzagoo.net/blog/wp-content/uploads/2008/09/chrome-domain-styling.png" alt="" title="chrome-domain-styling" width="468" height="62" class="aligncenter size-full wp-image-80" /></p>
<p>And the <del>https://</del> red thingy on invalid or non-trusted certificates is also nice:<br />
<img src="http://zytzagoo.net/blog/wp-content/uploads/2008/09/chrome-ssl-error.png" alt="" title="chrome-ssl-error" width="468" height="62" class="aligncenter size-full wp-image-81" /></p>
<p>The task manager (Shift + esc) shows highly useful stuff:<br />
<img src="http://zytzagoo.net/blog/wp-content/uploads/2008/09/chrome-task-manager.png" alt="" title="chrome-task-manager" width="431" height="336" class="aligncenter size-full wp-image-82" /><br />
With a much detailed breakdown of memory usage available &#8212; either click &#8220;stats for nerds&#8221; in the lower left corner of the task manager, or type in &#8220;about:memory&#8221; in the address bar.</p>
<p>The About window reveals the User-Agent string, and also automatically checks for updates:<br />
<img src="http://zytzagoo.net/blog/wp-content/uploads/2008/09/chrome-about.png" alt="" title="chrome-about" width="429" height="332" class="alignnone size-full wp-image-84" /></p>
<p>All in all, it looks &#038; feels promising. A definite sign of interesting times ahead for everyone involved.</p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2008/09/02/google-chrome-first-impressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome, hopefully in Croatia too!</title>
		<link>http://zytzagoo.net/blog/2008/09/02/google-chrome-hopefully-in-croatia-too/</link>
		<comments>http://zytzagoo.net/blog/2008/09/02/google-chrome-hopefully-in-croatia-too/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:14:55 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=78</guid>
		<description><![CDATA[The whole web is buzzing about Google Chrome, the comic is full of sweet-talk and promises of great user (and developer) experience, and other stuff that makes devs wet their pants a little. All the goodness will, of course, be available only to some countries&#8230; The google blog post mentions 100 countries. Which ones, though, [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.search-engine-war.co.uk/2008/09/google-chrome-d.html">whole</a> <a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html">web</a> <a href="http://money.netscape.cnn.com/story.jsp?floc=FF-RTO-robtz&#038;idq=/ff/story/0002%2F20080901%2F2112655370.htm">is</a> <a href="http://www.techcrunch.com/2008/09/01/meet-chrome-googles-windows-killer/">buzzing</a> about <a href="http://www.google.com/chrome">Google Chrome</a>, <a href="http://www.google.com/googlebooks/chrome/index.html">the comic</a> is full of sweet-talk and promises of great user (and developer) experience, and other stuff that makes devs wet their pants a little.</p>
<p>All the goodness will, of course, be available only to some countries&#8230; The google blog post mentions 100 countries. Which ones, though, is still a mistery. Can&#8217;t find any info at the moment. The chrome site was cached by Google itself, but I&#8217;m not able to get to the cached pages (at least from google.hr or google.com).</p>
<p>The Windows beta is to be released today, the press conference is at 18:00 GMT according to the Wikipedia page&#8230; Fingers crossed that Croatia makes the 100 countries list&#8230;</p>
<p><strong>UPDATE:</strong> Weee, it&#8217;s available for <a href="http://www.google.com/chrome">download</a>!</p>
<p>Here&#8217;s some more links:</p>
<ul>
<li><a href="http://john.jubjubs.net/2008/09/01/thoughts-on-chrome-more/">A Reaction from John Lilly, Mozilla CEO</a></li>
<li><a href="http://blogoscoped.com/archive/2008-09-02-n72.html">Google chrome screenshots</a></li>
<li><a href="http://en.wikipedia.org/wiki/Google_Chrome">Wikipedia: Google Chrome</a></li>
<li><a href="http://news.cnet.com/8301-17939_109-10030025-2.html">CNET coverage</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2008/09/02/google-chrome-hopefully-in-croatia-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hackish HOWTO: migrating a (larger) running OpenX installation to a new machine</title>
		<link>http://zytzagoo.net/blog/2008/07/04/hackish-howto-migrating-a-larger-running-openx-installation-to-a-new-machine/</link>
		<comments>http://zytzagoo.net/blog/2008/07/04/hackish-howto-migrating-a-larger-running-openx-installation-to-a-new-machine/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 09:00:37 +0000</pubDate>
		<dc:creator>zytzagoo</dc:creator>
				<category><![CDATA[Webdev]]></category>

		<guid isPermaLink="false">http://zytzagoo.net/blog/?p=64</guid>
		<description><![CDATA[Disclaimer: It&#8217;s a hack, but it worked :) You&#8217;re doing this at your own risk! Copying raw Mysql database files may corrupt your data to the point of no return! First, a little background information: we&#8217;ve been using OpenAds / OpenX even back in the days when it was called phpAdsNew. Last fall (septmeber to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Disclaimer:</strong> It&#8217;s a hack, but it worked :) You&#8217;re doing this at your own risk! Copying raw Mysql database files may corrupt your data to the point of no return!</p>
<p>First, a little background information: we&#8217;ve been using OpenAds / OpenX even back in the days when it was called phpAdsNew.</p>
<p>Last fall (septmeber to be exact) we&#8217;ve launched a new website, that ran OpenAds, a Vbulletin forum, and a custom CMS / application for other parts of the site.</p>
<p>At the beginning a single server was able to handle it all. Recently, however, the site usage grew, and the OpenX database grew to around 1.5GB in size, serving around 7 million ad impressions per month.</p>
<p>A new server appeared and it was decided we&#8217;re gonna move OpenX to its own dedicated machine.</p>
<p>Trying to dump the database contents to .sql files was proven to not be doable (without taking the server down for maintenance, which we felt was not good for our users). We wanted to migrate it without taking the server down and users noticing anything (if possible).</p>
<p>So, another solution was to be found, and here&#8217;s how we hacked it, in case someone else finds themselves in a similar situation:</p>
<ul>
<li>create a new empty database on the new server</li>
<li>scp the raw *.frm, *.myd and *.myi files from your old server&#8217;s mysql data dir to the newly created db&#8217;s data dir on the new server</li>
<li>chown the newly copied files to the appropriate user/group under which mysql is running on the new server (if different from the old one)</li>
<li>run <strong>mysqlrepair &#8211;database new_server_db_name &#8211;repair</strong> (see <a href="http://dev.mysql.com/doc/refman/5.1/en/mysqlcheck.html">http://dev.mysql.com/doc/refman/5.1/en/mysqlcheck.html</a> for more info and options)</li>
<li>scp the OpenX files over to the new server and chown/chmod appropriately</li>
<li>modify the OpenX config file in <strong>var/</strong> if you&#8217;re changing the server&#8217;s public address and stuff like that</li>
</ul>
<p>And that&#8217;s it. Everything worked after that.</p>
<p>After seeing that it all works, we upgraded to the latest OpenX release (2.4.7 at the time of writing) by just following the upgrade docs from the manual.</p>
<p>Once again, keep in mind that copying raw db files might cause MAJOR PROBLEMS, incompatibility issues, data inconsistencies etc.</p>
<p>You&#8217;re doing this at your own risk. <strong>Make sure that the Mysql versions are the same on both servers.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://zytzagoo.net/blog/2008/07/04/hackish-howto-migrating-a-larger-running-openx-installation-to-a-new-machine/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

