<?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>My Rant</title>
	<atom:link href="http://www.myrant.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.myrant.net</link>
	<description></description>
	<lastBuildDate>Sun, 17 Feb 2013 16:04:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Multi-screen with Ubuntu Unity</title>
		<link>http://www.myrant.net/2013/02/17/multi-screen-with-ubuntu-unity/</link>
		<comments>http://www.myrant.net/2013/02/17/multi-screen-with-ubuntu-unity/#comments</comments>
		<pubDate>Sun, 17 Feb 2013 16:03:32 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=369</guid>
		<description><![CDATA[This tweet has to have been the most popular thing I have ever said. At time of posting it has gained 80 retweets, 25 favourites and many replies/questions. Work recently bought me a new workstation, so the 1st thing I always do is to dual boot with Ubuntu. Some might consider me an edge case user. [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://twitter.com/bigcalm/status/303095108872585216" target="_blank">This tweet</a> has to have been the most popular thing I have ever said. At time of posting it has gained 80 retweets, 25 favourites and many replies/questions.</p>
<p>Work recently bought me a new workstation, so the 1st thing I always do is to dual boot with Ubuntu.</p>
<p>Some might consider me an edge case user. Though as a developer, I like a rather particular set-up. That is, 3 wide screen monitors with the central one rotated 90 degrees for my IDE.</p>
<p>This is something that Windows gets right without having to dig about installing things. While Linux distros have always struggled (in my experience).</p>
<p>Because my tweet gained quite a few questions, I thought it best to reply to them here for everybody to see.</p>
<p>@ankitvad asks what specs. I use for Ubuntu.<br />
<a href="http://www.spex4less.com/acatalog/XH_1045_Titanium_Rimless_Glasses.html" target="_blank">Titanium Rimless Glasses from Spex4Less.com</a><br />
Couldn&#8217;t resist, sorry <img src='http://www.myrant.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Dell Alienware X51<br />
CPU: i7<br />
Memory: 8GB<br />
Graphics card: nVidia GeForce GTX 660<br />
Storage: 1TB HDD (Windows) 120GB SSD (Linux)<br />
Mouse: Logictech M570 trackball<br />
OSs: Window 7 SP1, Ubuntu 12.10 64bit<br />
Monitors: 2 x 22&#8243; Dell, 1 x 22&#8243; LG</p>
<p>All 3 monitors are connected to the one graphics card. Two by DVI and one by HDMI.</p>
<p>As I said, this is a working system from a fresh install without updates being applied or any 3rd party packages installed. So the default graphics driver is doing quite well these days <img src='http://www.myrant.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The only downside to this is that the default graphics driver is dog slow and won&#8217;t let me play games on Steam <img src='http://www.myrant.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  The next step will be to get the nVidia binary driver working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2013/02/17/multi-screen-with-ubuntu-unity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Symfony2 pagination</title>
		<link>http://www.myrant.net/2013/02/06/symfony2-pagination/</link>
		<comments>http://www.myrant.net/2013/02/06/symfony2-pagination/#comments</comments>
		<pubDate>Wed, 06 Feb 2013 14:42:03 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=365</guid>
		<description><![CDATA[Using Symfony2, DQL and knplabs/knp-paginator-bundle &#8211; how to get around &#8220;Cannot count query which selects two FROM components, cannot make distinction&#8221;]]></description>
				<content:encoded><![CDATA[<p>Using Symfony2, DQL and knplabs/knp-paginator-bundle &#8211; how to get around &#8220;Cannot count query which selects two FROM components, cannot make distinction&#8221;</p>
<p><script src="https://gist.github.com/bigcalm/4722929.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2013/02/06/symfony2-pagination/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chroot SFTP home dir</title>
		<link>http://www.myrant.net/2013/02/05/chroot-sftp-home-dir/</link>
		<comments>http://www.myrant.net/2013/02/05/chroot-sftp-home-dir/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 15:21:32 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=360</guid>
		<description><![CDATA[Example user &#8216;iain&#8217; sudo mkdir -p /chroot/iain/home/iain sudo useradd -M -d /home/iain iain sudo passwd iain sudo chwon iain: /chroot/iain/home/iain sudo nano -w /etc/ssh/sshd_config # At the end of the file, add: Match User paypoint &#160;&#160;&#160;&#160;ChrootDirectory /chroot/iain &#160;&#160;&#160;&#160;AllowTCPForwarding no &#160;&#160;&#160;&#160;X11Forwarding no &#160;&#160;&#160;&#160;ForceCommand internal-sftp sudo /etc/init.d/ssh restart]]></description>
				<content:encoded><![CDATA[<p>Example user &#8216;iain&#8217;</p>
<p><code>sudo mkdir -p /chroot/iain/home/iain<br />
sudo useradd -M -d /home/iain iain<br />
sudo passwd iain<br />
sudo chwon iain: /chroot/iain/home/iain</p>
<p>sudo nano -w /etc/ssh/sshd_config<br />
# At the end of the file, add:</p>
<p>Match User paypoint<br />
&nbsp;&nbsp;&nbsp;&nbsp;ChrootDirectory /chroot/iain<br />
&nbsp;&nbsp;&nbsp;&nbsp;AllowTCPForwarding no<br />
&nbsp;&nbsp;&nbsp;&nbsp;X11Forwarding no<br />
&nbsp;&nbsp;&nbsp;&nbsp;ForceCommand internal-sftp</p>
<p>sudo /etc/init.d/ssh restart</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2013/02/05/chroot-sftp-home-dir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making an entity repository container aware in Symfony2.1</title>
		<link>http://www.myrant.net/2013/02/04/making-an-entity-repository-container-aware-in-symfony2-1/</link>
		<comments>http://www.myrant.net/2013/02/04/making-an-entity-repository-container-aware-in-symfony2-1/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 08:49:32 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=356</guid>
		<description><![CDATA[I had a need to add ACL rules to entities at the repository level. My biggest struggle was getting dependancy injection working. This is what I finally came up with after a fresh mind and an instant coffee:]]></description>
				<content:encoded><![CDATA[<p>I had a need to add ACL rules to entities at the repository level.</p>
<p>My biggest struggle was getting dependancy injection working.</p>
<p>This is what I finally came up with after a fresh mind and an instant coffee:</p>
<p><script src="https://gist.github.com/4705662.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2013/02/04/making-an-entity-repository-container-aware-in-symfony2-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding extra fields to FOSUserBundle / SonataUserBundle</title>
		<link>http://www.myrant.net/2012/10/03/adding-extra-fields-to-fosuserbundle-sonatauserbundle/</link>
		<comments>http://www.myrant.net/2012/10/03/adding-extra-fields-to-fosuserbundle-sonatauserbundle/#comments</comments>
		<pubDate>Wed, 03 Oct 2012 08:28:44 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=349</guid>
		<description><![CDATA[Sadly, this isn&#8217;t really documented (at time of writing). Adding new protected variables to your User.php entity will not actually create database entries when you try to do a doctrine:schema:update. While one still needs to have the protected variables in this entity class, along with getters and setters, the actual creation work is within UserBundle/Resources/config/doctrine/User.orm.xml [...]]]></description>
				<content:encoded><![CDATA[<p>Sadly, this isn&#8217;t really documented (at time of writing).</p>
<p>Adding new protected variables to your User.php entity will not actually create database entries when you try to do a doctrine:schema:update.</p>
<p>While one still needs to have the protected variables in this entity class, along with getters and setters, the actual creation work is within UserBundle/Resources/config/doctrine/User.orm.xml</p>
<p>Here is an example for adding a foreign key:</p>
<pre name="code" class="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
        http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"&gt;

    &lt;entity name="Application\Sonata\UserBundle\Entity\User" table="fos_user_user"&gt;

        &lt;id name="id" column="id" type="integer"&gt;
            &lt;generator strategy="AUTO" /&gt;
        &lt;/id&gt;

        &lt;many-to-one field="client" target-entity="Myvendor\MyBundle\Entity\Client" orphan-removal=""&gt;
            &lt;join-columns&gt;
                &lt;join-column name="client_id" referenced-column-name="id" nullable="1"/&gt;
            &lt;/join-columns&gt;
        &lt;/many-to-one&gt;

    &lt;/entity&gt;

&lt;/doctrine-mapping&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2012/10/03/adding-extra-fields-to-fosuserbundle-sonatauserbundle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 12.04 LTS on Bytemark VM</title>
		<link>http://www.myrant.net/2012/06/26/ubuntu-12-04-lts-on-bytemark-vm/</link>
		<comments>http://www.myrant.net/2012/06/26/ubuntu-12-04-lts-on-bytemark-vm/#comments</comments>
		<pubDate>Tue, 26 Jun 2012 11:05:58 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=338</guid>
		<description><![CDATA[If, like me, you can&#8217;t wait for Ubuntu 12.04.1 to be released, you can force an upgrade of your favourite OS OS. sudo apt-get update; sudo do-release-upgrade -d If you are going from the previous LTS 10.04, then the -d is important. Otherwise there would be no upgrade to offer. The upgrade process should go smoothly [...]]]></description>
				<content:encoded><![CDATA[<p>If, like me, you can&#8217;t wait for Ubuntu 12.04.1 to be released, you can force an upgrade of your favourite OS OS.</p>
<pre name="code" class="sh">sudo apt-get update;
sudo do-release-upgrade -d</pre>
<p>If you are going from the previous LTS 10.04, then the -d is important. Otherwise there would be no upgrade to offer.</p>
<p>The upgrade process should go smoothly enough. Except for when it comes to the kernel.</p>
<p>Bytemark VM&#8217;s make use of kernels that sit outside of the VM itself.</p>
<p>I didn&#8217;t realise this until I tried to fix syslog doing this:</p>
<pre>Jun 26 10:30:01 banana kernel: Cannot read proc file system: 1 - Operation not permitted.
Jun 26 10:31:02 banana kernel: last message repeated 1745888 times
Jun 26 10:32:03 banana kernel: last message repeated 1722636 times
Jun 26 10:33:04 banana kernel: last message repeated 1621724 times
Jun 26 10:34:05 banana kernel: last message repeated 1761707 times</pre>
<p>Even if you update grub, it&#8217;ll be ignored. Instead, follow the instructions here: <a href="http://www.bytemark.co.uk/support/technical_documents/kernelchange?tags=VirtualMachine">http://www.bytemark.co.uk/support/technical_documents/kernelchange?tags=VirtualMachine</a></p>
<p>At the time of writing, I chose 3.2.0-kvm-i386-20110111 as it&#8217;s fairly close to the kernel being used by other Ubuntu 12.04 machines I have.</p>
<p>Your mileage may vary, but I hope this helps somebody else with the same trouble.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2012/06/26/ubuntu-12-04-lts-on-bytemark-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating a WordPress database with new domain details</title>
		<link>http://www.myrant.net/2012/06/24/updating-a-wordpress-database-with-new-domain-details/</link>
		<comments>http://www.myrant.net/2012/06/24/updating-a-wordpress-database-with-new-domain-details/#comments</comments>
		<pubDate>Sun, 24 Jun 2012 17:31:35 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=325</guid>
		<description><![CDATA[Further to my original quick db update queries, I found the need for a more in-depth approach. A WordPress site my father works on has weekly backups, but he wanted to see that they actually worked. To do so, I set up a subdomain vhost on my bytemark server and set about getting the back to work [...]]]></description>
				<content:encoded><![CDATA[<p>Further to my original quick db update queries, I found the need for a more in-depth approach.</p>
<p>A WordPress site my father works on has weekly backups, but he wanted to see that they actually worked.<br />
To do so, I set up a subdomain vhost on my bytemark server and set about getting the back to work with it.</p>
<p>One of the most annoying/lazy/strange things about WordPress is that it uses serialised arrays <strong>within</strong> database fields. This makes a simple search and replace fail if you need to do anything more than <a title="Updating WordPress site URLs for different hosts" href="http://www.myrant.net/2011/03/03/updating-wordpress-site-urls-for-different-hosts/">update the two fields here</a>.</p>
<p>This script works for the database set-up for my father. It may require further tweaks if additional plugins store absolute paths or URLs.</p>
<p>It also could do with a heavy dose of refactoring, but it works for my needs at this point in time <img src='http://www.myrant.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre name="code" class="php">&lt;?php
$argv = (isset($argv)) ? $argv : array(1 =&gt; 'wp3/wp-config.php');
if (!isset($argv[1]))
{
	die("Please tell me where wp-config.php is\n");
}

$oldURL = 'http://oldDomainName.com';
$newURL = 'http://backup.of.my.wordpress.site.com';

$oldPath = '/home/chem9598/public_html/';
$newPath = '/var/www/backup_wordpres_site/codebase/htdocs/';

$configFile = $argv[1];
include_once($configFile);

$db = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

/*
* 1.1) wp_options - simple options
*/
echo "&lt;br /&gt;1.1) wp_options - simple options: ";
$updateOptionsSql = "UPDATE wp_options SET option_value = REPLACE(option_value, '" . $oldURL . "', '" . $newURL . "') WHERE option_name IN ('siteurl', 'home');";
$updateOptionsRes = mysql_query($updateOptionsSql, $db);
if (!$updateOptionsRes)
	echo mysql_error($db) . "&lt;br /&gt;";
else
	echo mysql_affected_rows ($db) . " rows affected&lt;br /&gt;";


/*
* 1.2) wp_options - serialised array options
*/
echo "&lt;br /&gt;1.2) wp_options - serialised array options: ";
$selectOptionsSql = 'SELECT * FROM wp_options WHERE option_value LIKE "%' . $oldURL . '%"';
$selectOptionsRes = mysql_query($selectOptionsSql, $db);
if (!$selectOptionsRes)
	echo mysql_error($db) . "&lt;br /&gt;";

$options = array();
while($selectOptionsRes &amp;&amp; $row = mysql_fetch_assoc($selectOptionsRes))
{
	$options[] = $row;
}

foreach ($options as $option)
{
	if (substr($option['option_value'], 0, 2) == 'a:')
	{
		$optionValue = unserialize($option['option_value']);

		updateArray($optionValue, $oldURL, $newURL);

		$option['option_value'] = serialize($optionValue);
		$updateOptionsSql = "UPDATE wp_options SET option_value = '" . mysql_escape_string($option['option_value']) . "' WHERE option_id = " . $option['option_id'];
		$updateOptionsRes = mysql_query($updateOptionsSql, $db);
		if (!$updateOptionsRes)
			echo mysql_error($db) . "&lt;br /&gt;";
		else
			echo ".";
	}
}
echo "&lt;br /&gt;";


/*
* 1.3) wp_options - file path
*/
echo "&lt;br /&gt;1.3) wp_options - file path: ";
$selectOptionsSql = 'SELECT * FROM wp_options WHERE option_value LIKE "%' . $oldPath . '%"';
$selectOptionsRes = mysql_query($selectOptionsSql, $db);
if (!$selectOptionsRes)
	echo mysql_error($db) . "&lt;br /&gt;";

$options = array();
while($selectOptionsRes &amp;&amp; $row = mysql_fetch_assoc($selectOptionsRes))
{
	$options[] = $row;
}

foreach ($options as $option)
{
	if (substr($option['option_value'], 0, 2) == 'a:')
	{
		$optionValue = unserialize($option['option_value']);

		updateArray($optionValue, $oldPath, $newPath);

		$option['option_value'] = serialize($optionValue);
		$updateOptionsSql = "UPDATE wp_options SET option_value = '" . mysql_escape_string($option['option_value']) . "' WHERE option_id = " . $option['option_id'];
		$updateOptionsRes = mysql_query($updateOptionsSql, $db);
		if (!$updateOptionsRes)
			echo mysql_error($db) . "&lt;br /&gt;";
		else
			echo ".";
	}
}
echo "&lt;br /&gt;";


/*
* 2.1) wp_posts - guid
*/
echo "&lt;br /&gt;2.1) wp_posts - guid: ";
$updatePostsSql = "UPDATE wp_posts SET guid = REPLACE(guid, '" . $oldURL . "', '" . $newURL . "');";
$updatePostsRes = mysql_query($updatePostsSql, $db);
if (!$updatePostsRes)
	echo mysql_error($db) . "&lt;br /&gt;";
else
	echo mysql_affected_rows ($db) . " rows affected&lt;br /&gt;";


/*
* 2.2) wp_posts - post_content
*/
echo "&lt;br /&gt;2.2) wp_posts - post_content: ";
$updatePostsSql = "UPDATE wp_posts SET post_content = REPLACE(post_content, '" . $oldURL . "', '" . $newURL . "');";
$updatePostsRes = mysql_query($updatePostsSql, $db);
if (!$updatePostsRes)
	echo mysql_error($db) . "&lt;br /&gt;";
else
	echo mysql_affected_rows ($db) . " rows affected&lt;br /&gt;";


function debug($var)
{
	echo "&lt;pre&gt;";
	print_r($var);
	echo "&lt;/pre&gt;";
}

function updateArray(&amp;$array, $find, $replace)
{
	foreach ($array as $key =&gt; &amp;$value)
	{
		if (is_array($value))
		{
			updateArray($value, $find, $replace);
		}
		else
		{
			$array[$key] = str_replace($find, $replace, $value);
		}
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2012/06/24/updating-a-wordpress-database-with-new-domain-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PPTP tunnels and if-up.d</title>
		<link>http://www.myrant.net/2012/03/29/pptp-tunnels-and-if-up-d/</link>
		<comments>http://www.myrant.net/2012/03/29/pptp-tunnels-and-if-up-d/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 16:43:33 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=320</guid>
		<description><![CDATA[Current project requires a couple of VPN tunnels to be set up. An IPsec and a PPTP. The IPsec will wait for another day, the PPTP is set up and ready to go. One thing that wasn&#8217;t quite right with the tunnel though, is the static route created by PPTP missed out a large chunk [...]]]></description>
				<content:encoded><![CDATA[<p>Current project requires a couple of VPN tunnels to be set up. An IPsec and a PPTP.<br />
The IPsec will wait for another day, the PPTP is set up and ready to go.<br />
One thing that wasn&#8217;t quite right with the tunnel though, is the static route created by PPTP missed out a large chunk of the server&#8217;s network.</p>
<p>Starting the tunnel sets up the routing rule of 192.168.100.111 to be sent to the tunnel.</p>
<p>This meant that if I wanted to get to 100.10, it wasn&#8217;t being sent.</p>
<p>The way around this was to add a new route: route add -host 192.168.100.10 dev ppp0</p>
<p>Works great from the CLI, nothing happens when added to /etc/network/interfaces or /etc/network/if-up.d/foobar.</p>
<p>Found out (trial and error) that it was trying to add the route as soon as the tunnel was created. This doesn&#8217;t work as the tunnel takes a few seconds to wake up.</p>
<p>Work around was to add a &#8216;sleep 5&#8242; to /etc/network/if-up.d/foobar before the route command line.</p>
<p>Creating race conditions isn&#8217;t nice, but it works <img src='http://www.myrant.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2012/03/29/pptp-tunnels-and-if-up-d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony 1.4 Doctrine 1.2 MS SQL Server</title>
		<link>http://www.myrant.net/2012/02/02/symfony-1-4-doctrine-1-2-ms-sql-server/</link>
		<comments>http://www.myrant.net/2012/02/02/symfony-1-4-doctrine-1-2-ms-sql-server/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 00:03:57 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=310</guid>
		<description><![CDATA[Web server: Linux (Ubuntu on my dev setup), Apache, PHP 5.3, Symfony 1.4, Doctrine 1.2. Database server: Microsoft Windows 2008 Server, MS SQL Server Trying to get Symfony to talk to the database server has been a painful experience for the last few days. But perseverance has paid off. Lots of Googling with trial &#38; [...]]]></description>
				<content:encoded><![CDATA[<p>Web server: Linux (Ubuntu on my dev setup), Apache, PHP 5.3, Symfony 1.4, Doctrine 1.2.<br />
Database server: Microsoft Windows 2008 Server, MS SQL Server</p>
<p>Trying to get Symfony to talk to the database server has been a painful experience for the last few days. But perseverance has paid off.</p>
<p>Lots of Googling with trial &amp; error has resulted in actually achieving a development setup that will mirror the eventual production setup.</p>
<p>Short version:</p>
<ol>
<li>Follow the FreeTDS and ODBC setup instructions of <a href="http://jamesrossiter.wordpress.com/2011/03/08/connecting-to-microsoft-sql-server-using-odbc-from-ubuntu-server/">http://jamesrossiter.wordpress.com/2011/03/08/connecting-to-microsoft-sql-server-using-odbc-from-ubuntu-server/</a></li>
<li>Use the following in config/databases.yml</li>
</ol>
<pre name="code" class="yml">all:
  doctrine:
    class: sfDoctrineDatabase
      param:
        dsn: dblib:dbname=datasourcename;host=sqlserver;
        username: ###
        password: ###</pre>
<p>In the above snippit, replace &#8216;datasourcename&#8217; with whatever you used in /etc/odbc.ini and replace &#8216;sqlserver&#8217; with the name used in /etc/freetds/freetds.conf &amp; /etc/odbc.ini</p>
<p>It&#8217;s late and I&#8217;ve been struggling to get this working for some time. I may expand this entry in the future if required.</p>
<p>References and insperation:<br />
1) <a href="http://blog.acjacinto.com/2011/11/compiling-php-with-mssql-servers-native.html">http://blog.acjacinto.com/2011/11/compiling-php-with-mssql-servers-native.html</a><br />
2) <a href="http://www.microsoft.com/download/en/details.aspx?id=28160">http://www.microsoft.com/download/en/details.aspx?id=28160</a><br />
3) <a href="http://jamesrossiter.wordpress.com/2011/03/08/connecting-to-microsoft-sql-server-using-odbc-from-ubuntu-server/">http://jamesrossiter.wordpress.com/2011/03/08/connecting-to-microsoft-sql-server-using-odbc-from-ubuntu-server/</a><br />
4) <a href="http://trac.symfony-project.org/wiki/HowToConnectToMSSQLServer">http://trac.symfony-project.org/wiki/HowToConnectToMSSQLServer</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2012/02/02/symfony-1-4-doctrine-1-2-ms-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google calendar in Mozilla Thunderbird on Ubuntu 11.10</title>
		<link>http://www.myrant.net/2011/11/18/google-calendar-in-mozilla-thunderbird-on-ubuntu-11-10/</link>
		<comments>http://www.myrant.net/2011/11/18/google-calendar-in-mozilla-thunderbird-on-ubuntu-11-10/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 12:12:40 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.myrant.net/?p=307</guid>
		<description><![CDATA[Via the Ubuntu Software Centre: Search for thunderbird Click on the search result &#8220;Thunderbird Email&#8221; and then on the &#8220;More Info&#8221; button Enable at least the &#8220;Calendar Extension for Thunderbird &#8211; Google Calendar support (xul-ext-gdata-provider)&#8221; Install the add-ons Open your Google Calendar in your web browser In the left-hand column, under &#8220;My calendars&#8221;, hover over [...]]]></description>
				<content:encoded><![CDATA[<p>Via the Ubuntu Software Centre:</p>
<ol>
<li>Search for thunderbird</li>
<li>Click on the search result &#8220;Thunderbird Email&#8221; and then on the &#8220;More Info&#8221; button</li>
<li>Enable at least the &#8220;Calendar Extension for Thunderbird &#8211; Google Calendar support (xul-ext-gdata-provider)&#8221;</li>
<li>Install the add-ons</li>
<li>Open your Google Calendar in your web browser</li>
<li>In the left-hand column, under &#8220;My calendars&#8221;, hover over the calendar of choice and click the down arrow that appears after the calendar name</li>
<li>Select &#8220;Calendar settings&#8221;</li>
<li>Close to the bottom of the page will be the &#8220;Calendar ID&#8221; (in my case it is my full email address. Make a note of this ID.</li>
<li>Start up Thunderbird upon completion.</li>
<li>File -&gt; New -&gt; Calendar</li>
<li>Select &#8220;On the Network&#8221; and click Next</li>
<li>Select &#8220;CalDAV&#8221;</li>
<li>In the Location field enter: https://www.google.com/calendar/dav/calendar.id.noted.in.point.8/events</li>
<li>Click Next then enter a name for the calendar and set an email account against it</li>
<li>When prompted, enter your username and password for accessing this calendar</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.myrant.net/2011/11/18/google-calendar-in-mozilla-thunderbird-on-ubuntu-11-10/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
