<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Christopher Shennan's Blog</title>
	
	<link>http://www.chrisshennan.com</link>
	<description>A day in the life of...</description>
	<lastBuildDate>Fri, 06 Apr 2012 10:17:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ChristopherShennansBlog" /><feedburner:info uri="christophershennansblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Installing the Sonata Admin Bundle</title>
		<link>http://www.chrisshennan.com/2012/03/29/installing-the-sonata-admin-bundle/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=installing-the-sonata-admin-bundle</link>
		<comments>http://www.chrisshennan.com/2012/03/29/installing-the-sonata-admin-bundle/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 16:33:29 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Symfony2]]></category>
		<category><![CDATA[sonata]]></category>
		<category><![CDATA[sonataAdminBundle]]></category>
		<category><![CDATA[sonatablockbundle]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=754</guid>
		<description><![CDATA[The second part of this Sonata Bundles mini series takes us onto installing the SonataAdmin bundle.  This pretty much follows the instructions in the official documentation but required a few additional steps in order to get it up and running.  The basic process I followed is detailed below. Step 1 &#8211; Update the deps file [...]]]></description>
			<content:encoded><![CDATA[<p>The second part of this <a title="Symfony2 and Sonata Project Bundles" href="http://www.chrisshennan.com/2012/02/16/symfony2-and-sonata-project-bundles/">Sonata Bundles mini series</a> takes us onto installing the SonataAdmin bundle.  This pretty much follows the instructions in the official documentation but required a few additional steps in order to get it up and running.  The basic process I followed is detailed below.</p>
<h3>Step 1 &#8211; Update the deps file to install the necessary vendor bundles</h3>
<p>Add the following lines to the deps file of your Symfony2 project</p>
<pre class="brush: bash; title: ; notranslate">
[SonataAdminBundle]
    git=http://github.com/sonata-project/SonataAdminBundle.git
    target=/bundles/Sonata/AdminBundle

[SonataBlockBundle]
    git=http://github.com/sonata-project/SonataBlockBundle.git
    target=/bundles/Sonata/BlockBundle

[SonataCacheBundle]
    git=http://github.com/sonata-project/SonataCacheBundle.git
    target=/bundles/Sonata/CacheBundle

[SonatajQueryBundle]
    git=http://github.com/sonata-project/SonatajQueryBundle.git
    target=/bundles/Sonata/jQueryBundle

[KnpMenuBundle]
    git=http://github.com/KnpLabs/KnpMenuBundle.git
    target=/bundles/Knp/Bundle/MenuBundle

[KnpMenu]
    git=http://github.com/KnpLabs/KnpMenu.git
    target=/knp/menu

[Exporter]
    git=http://github.com/sonata-project/exporter.git
    target=/exporter

</pre>
<p><span id="more-754"></span></p>
<h3>Step 2 &#8211; Install the vendor bundles</h3>
<p>Run the following command from a shell prompt in the root of your Symfony2 project</p>
<pre class="brush: bash; title: ; notranslate">
php bin/vendors install
</pre>
<h3>Step 3 &#8211; Update autoload.php</h3>
<p>Edit /app/autoload.php and add the following lines</p>
<pre class="brush: php; title: ; notranslate">
$loader-&gt;registerNamespaces(array(
    // ...
    'Sonata'     =&gt; __DIR__.'/../vendor/bundles',
    'Exporter'   =&gt; __DIR__.'/../vendor/exporter/lib',
    'Knp\Bundle' =&gt; __DIR__.'/../vendor/bundles',
    'Knp\Menu'   =&gt; __DIR__.'/../vendor/knp/menu/src',
    // ...
));
</pre>
<h3>Step 4 &#8211; Update AppKernel.php</h3>
<p>Edit /app/AppKernel.php and add the following lines</p>
<pre class="brush: php; title: ; notranslate">
public function registerBundles()
{
    return array(
        // ...
        new Sonata\AdminBundle\SonataAdminBundle(),
        new Sonata\BlockBundle\SonataBlockBundle(),
        new Sonata\CacheBundle\SonataCacheBundle(),
        new Sonata\jQueryBundle\SonatajQueryBundle(),
        new Knp\Bundle\MenuBundle\KnpMenuBundle(),
        // ...
    );
}
</pre>
<h3>Step 5 &#8211; Updating the config.app file</h3>
<p>Now that we have installed the SonataBlockBundle we need to add basic configuration for it otherwise Symfony will complain. This can be done by adding the following lines to your app/config/config.yml file</p>
<pre class="brush: plain; title: ; notranslate">
# app/config/config.yml
sonata_block:
    default_contexts: [cms]
    blocks:
        sonata.admin.block.admin_list:
            contexts:   [admin]

        #sonata.admin_doctrine_orm.block.audit:
        #    contexts:   [admin]

        sonata.block.service.text:
        sonata.block.service.action:
        sonata.block.service.rss:

        # Some specific block from the SonataMediaBundle
        #sonata.media.block.media:
        #sonata.media.block.gallery:
        #sonata.media.block.feature_media:
</pre>
<p>The official documentation also states we need to add the translator configuration value if we wish to use the default translation i.e. have the admin show proper titles and labels rather than page titles like &#8220;title_dashboard&#8221;.  The documentation suggests that you add in the following to your /app/config.yml file</p>
<pre class="brush: plain; title: ; notranslate">
framework:
    translator: ~
</pre>
<p>but I found the following more robust</p>
<pre class="brush: plain; title: ; notranslate">
framework:
    translator:      { fallback: en }
</pre>
<p>Since we are editing the config.yml file now I would suggest putting it in while we remember :)</p>
<h3>Step 6 &#8211; Add the routing.yml Configuratino</h3>
<p>We need to add the appropriate configuration into our routing file so we can use the SonataAdmin bundle.  Add the following into /app/config/routing.yml</p>
<pre class="brush: plain; title: ; notranslate">
admin:
    resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
    prefix: /admin

_sonata_admin:
    resource: .
    type: sonata_admin
    prefix: /admin

</pre>
<h3>Step 7 &#8211; Install the bundle assets</h3>
<p>Run the following command from a shell prompt in the root of your Symfony2 project</p>
<pre class="brush: bash; title: ; notranslate">
php app/console assets:install web --symlink
</pre>
<h3>Step 8 &#8211; Clear the cache</h3>
<p>Run the following command from a shell prompt in the root of your Symfony2 project</p>
<pre class="brush: bash; title: ; notranslate">
php app/console cache:clear
</pre>
<h3>Step 9 &#8211; Access The Admin</h3>
<p>That should be everything we need to do to get the SonataAdmin bundle setup and ready to access.  If this has been done correctly you should be able to go to the admin URL for your Symfony2 project i.e. http://symfony2.chris.home.internal/admin (assuming we are using the same configuration we used in <a title="Installing and configuring Symfony2" href="http://www.chrisshennan.com/2012/02/23/installing-and-configuring-symfony2/" target="_blank">Part 1 &#8211; Installing and Configuring Symfony2</a>) and you should be presented with a screen similar to:-</p>
<p><a href="http://www.chrisshennan.com/wp-content/uploads/2012/03/SonataAdminDashboardBlank.jpg"><img class="aligncenter size-full wp-image-772" title="SonataAdminDashboardBlank" src="http://www.chrisshennan.com/wp-content/uploads/2012/03/SonataAdminDashboardBlank.jpg" alt="" width="600" height="410" /></a></p>
<h2></h2>
<p>There is not much we can do with it at the moment as we have not created any models yet and we will cover that in the next post.</p>
<h2>Sources</h2>
<p>SonataAdminBundle Installation Documentation<br />
<a href="http://sonata-project.org/bundles/admin/master/doc/reference/installation.html" target="_blank">http://sonata-project.org/bundles/admin/master/doc/reference/installation.html</a></p>
<p>SonataBlockBundle Installation Documentation<br />
<a href="http://sonata-project.org/bundles/block/master/doc/reference/installation.html" target="_blank">http://sonata-project.org/bundles/block/master/doc/reference/installation.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2012/03/29/installing-the-sonata-admin-bundle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing and configuring Symfony2</title>
		<link>http://www.chrisshennan.com/2012/02/23/installing-and-configuring-symfony2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=installing-and-configuring-symfony2</link>
		<comments>http://www.chrisshennan.com/2012/02/23/installing-and-configuring-symfony2/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 20:45:39 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Symfony2]]></category>
		<category><![CDATA[symfony2]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=700</guid>
		<description><![CDATA[In this first part of my mini series about installing and configuring the Sonata Project bundles I will address the prerequiste which is to ensure we have a working Symfony2 project set up and configured.  This will focus on 2 main parts:- The Bare Essentials &#8211; Just enough to get it going The Optional Extras [...]]]></description>
			<content:encoded><![CDATA[<p>In this first part of my <a title="Symfony2 and Sonata Project Bundles" href="http://www.chrisshennan.com/2012/02/16/symfony2-and-sonata-project-bundles/">mini series</a> about installing and configuring the Sonata Project bundles I will address the prerequiste which is to ensure we have a working Symfony2 project set up and configured.  This will focus on 2 main parts:-</p>
<ul>
<li>The Bare Essentials &#8211; Just enough to get it going</li>
<li>The Optional Extras &#8211; One or 2 nice little touches to help smooth over issues later on.</li>
</ul>
<p>Hopefully this will be helpful to more than just me :)</p>
<p><span id="more-700"></span></p>
<h2>The Bare Essentials</h2>
<p>Getting a Symfony2 project up and running is fairly easy but I did come across a few bumps in the road when I first attempted it so I am hoping to smooth those bumps out a bit for some of you first timers.  The basic process is:-</p>
<h3>Step 1 &#8211; Create a project directory</h3>
<p>Make a folder on your web server for your Symfony2 project.  I will assume we are using /home/chrisshennan/public_html/symfony2.chris.home.internal/ as our root directory for this tutorial.</p>
<h3>Step 2 &#8211; Download &amp; Extract the Symfony2 project files</h3>
<p>Download the <a title="Symfony2 Standard Edition without vendors" href="http://symfony.com/download" target="_blank">Symfony2 Standard Edition without vendors</a> and extract into the your Symfony2 project folder.  When extracting the Symfony2 project it will create a folder called &#8220;Symfony&#8221;.  Move the contents from &#8220;Symfony&#8221; into the root directory and delete the &#8220;Symfony&#8221; folder.   You should now have the main project folders located :-</p>
<blockquote><p>apps = /home/chrisshennan/public_html/symfony2.chris.home.internal/apps<br />
bin = /home/chrisshennan/public_html/symfony2.chris.home.internal/bin<br />
src = /home/chrisshennan/public_html/symfony2.chris.home.internal/src</p>
<p>etc etc</p></blockquote>
<h3>Step 3 &#8211; Install the vendor libraries</h3>
<p>To install the vendor libraries, open a command prompt, change directory to your Symfony2 project directory run the following command below:-</p>
<pre class="brush: bash; title: ; notranslate">
php bin/vendors install
</pre>
<p>At the time of writing, the above command seemed to intermittently produce errors like the one below</p>
<blockquote><p>Cloning into /home/chrisshennan/public_html/symfony2.chris.home.internal/vendor/symfony&#8230;<br />
error: The requested URL returned error: 403 while accessing http://github.com/symfony/symfony.git/info/refs</p>
<p>fatal: HTTP request failed</p></blockquote>
<p>This is easily fixed by editing the deps file in a text editor and doing a search and replace and replacing all instances for &#8220;http://&#8221; with &#8220;git://&#8221;.  Once this has been done then re-run the command above and it should install the vendor bundles properly.  There is quite a lot of data to download and install so this could take several minutes to complete.</p>
<h3>Tada</h3>
<p>And that is basically it.  If you have configured your web server to run the Symfony project via http://localhost/web then you should be able to go there now and see:-</p>
<p style="text-align: center;"><a href="http://www.chrisshennan.com/wp-content/uploads/2012/02/symfony2_demo_page.jpg"><img class="aligncenter  wp-image-707" title="symfony2_demo_page" src="http://www.chrisshennan.com/wp-content/uploads/2012/02/symfony2_demo_page.jpg" alt="" width="600" height="403" /></a></p>
<p style="text-align: left;">You can now configure some additional options (like database connection) via the configuration wizard which can be found at http://localhost/web/config.php</p>
<h2>The Optional Extras</h2>
<h3>Apache vhost Configuration</h3>
<p>Like many of you, my local machine is not the same as my web server so using localhost is no good to me.  For this tutorial lets assume my web server is running on a host with an IP of 192.168.0.250 but I have many sites in development running on that server so I can&#8217;t just use http://192.168.0.250 to render the Symfony2 site as I have to consider how to keep the other sites working too.  How can I set up my Symfony2 site to work from my web server?</p>
<p>The solution I use works in 2 parts:-</p>
<ul>
<li>Set up a local hosts configuration value to resolve symfony2.chris.home.internal to 192.168.0.250</li>
<li>Set up a apache vhost of your web server so that it can deal with requests to symfony2.chris.home.internal</li>
</ul>
<h4>Local Hosts Configuration Value</h4>
<ul>
<li>If your local machine is running Windows then edit C:\Windows\System32\drivers\etc\hosts</li>
<li>If your local machine is Linux or Mac then edit /etc/hosts</li>
</ul>
<p>In both cases add the following line to the end of the file</p>
<pre class="brush: bash; title: ; notranslate">
192.168.0.250        symfony2.chris.home.internal
</pre>
<h4>Apache vhost Configuration</h4>
<p>Next we need to add a vhost configuration for symfony2.chris.home.internal on our web server and I have included an example of this below.  If you need more information on setting up a vhost configuration on your web server then you should have a read of <a title="Apache Virtual Hosts on Ubuntu - Part 1" href="http://articles.slicehost.com/2010/5/19/apache-virtual-hosts-on-ubuntu-part-1" target="_blank">Apache Virtual Hosts on Ubuntu &#8211; Part 1</a>.  This will be slightly biased towards Ubuntu configuration but the general configuration is covered well here.</p>
<pre class="brush: bash; title: ; notranslate">
NameVirtualHost *:80

&lt;VirtualHost *:80&gt;
    DocumentRoot /home/chrisshennan/public_html/symfony2.chris.home.internal/web
    ServerName symfony2.chris.home.internal&lt;code&gt;

    # Custom log file
    Loglevel warn
    ErrorLog /home/chrisshennan/wwwlogs/symfony2.chris.home.internal-error.log
    CustomLog /home/chrisshennan/wwwlogs/symfony2.chris.home.internal-access.log combined

    &lt;Directory /home/chrisshennan/public_html/symfony2.chris.home.internal/web&gt;
        AllowOverride None

        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ app.php [QSA,L]

    &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>
<p>Although there is a .htaccess file in the web folder which will direct all the requests to app.php, I prefer to disable the .htaccess files and put the configuration in the vhost.  The main reason for this is so that I don&#8217;t accidentally check in a .htaccess used for a development environment which ends up getting deployed to a live site and cause problems.</p>
<p>I have also defined the document root as &#8220;/home/chrisshennan/public_html/symfony2.chris.home.internal/web&#8221; which means that we will be able to access our Symfony2 project via http://symfony2.chris.home.internal rather than http://symfony2.chris.home.internal/web.</p>
<p>The above example is for a web server which is on a remote host but it will work fine if you wish to run multiple sites on localhost as well&#8230; simply substitute 127.0.0.1 instead of 192.168.0.250 as appropriate:-</p>
<h3>The Development Environment</h3>
<p>The basic installation of the Symfony2 project directs all requests to app.php but if you are working on a development site it can be a pain to remember to explicitly type app_dev.php in the URL to use to the development environment and can lead to some confusion when things don&#8217;t display as you expect.</p>
<p>To get around this, edit the vhost file you created in the section above and update the last statement from</p>
<pre class="brush: bash; title: ; notranslate">
RewriteRule ^(.*)$ app.php [QSA,L]
</pre>
<p>to</p>
<pre class="brush: bash; title: ; notranslate">
RewriteRule ^(.*)$ app_dev.php [QSA,L]
</pre>
<p>This will now mean that when you access symfony2.chris.home.internal you will always using the development environment unless you explicitly enter app.php in the URL which will more likely suit your needs.</p>
<p>However, If you try and access http://symfony2.chris.home.internal now you will be presented with a 403 &#8211; Forbidden message which is because app_dev.php is only accessible via localhost by default.  You will need to make a small amendment to the app_dev.php file to allow you to access it from your local machine which is to change</p>
<pre class="brush: php; title: ; notranslate">
if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
    '127.0.0.1',
    '::1',
))) {
    header('HTTP/1.0 403 Forbidden');
    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
</pre>
<p>to</p>
<pre class="brush: php; title: ; notranslate">
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1','::1',)) &amp;&amp; substr($_SERVER['HTTP_HOST'], -14) != '.home.internal' ) {

    header('HTTP/1.0 403 Forbidden');
    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
</pre>
<p>And that should be you.  By this point you should be able to:-</p>
<ul>
<li>Install Symfony2 and the vendor libraries</li>
<li>Set up a hostname to allow access to your Symfony2 site from a remote web server (or localhost if desired)</li>
<li>Set up the development environment as the default environment</li>
</ul>
<p>I hope this was helpful and I look forward to seeing your comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2012/02/23/installing-and-configuring-symfony2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Symfony2 and Sonata Project Bundles</title>
		<link>http://www.chrisshennan.com/2012/02/16/symfony2-and-sonata-project-bundles/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=symfony2-and-sonata-project-bundles</link>
		<comments>http://www.chrisshennan.com/2012/02/16/symfony2-and-sonata-project-bundles/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 20:30:06 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony2]]></category>
		<category><![CDATA[sonata]]></category>
		<category><![CDATA[sonata project]]></category>
		<category><![CDATA[sonataAdminBundle]]></category>
		<category><![CDATA[sonataMediaBundle]]></category>
		<category><![CDATA[sonataNewsBundle]]></category>
		<category><![CDATA[sonataPageBundle]]></category>
		<category><![CDATA[symfony2]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=684</guid>
		<description><![CDATA[Recently I have started learning Symfony2 (having previously been using Symfony 1.4 and Diem) and I opted to try out the Sonata Project bundles, primarily so I could use the SonataAdminBundle for my CRUD admin interface to allow an easy and quick way to enter data and the SonataAdminBundle had a very similar look and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have started learning Symfony2 (having previously been using Symfony 1.4 and Diem) and I opted to try out the Sonata Project bundles, primarily so I could use the SonataAdminBundle for my CRUD admin interface to allow an easy and quick way to enter data and the SonataAdminBundle had a very similar look and feel to what I was already using.</p>
<p>I had a few issues getting the bundles all working together as the Sonata Project bundles come in 8 parts (all of which can be found at <a title="Sonata Bundles" href="http://sonata-project.org/bundles/" target="_blank">http://sonata-project.org/bundles/</a>) and there were some inter-dependencies and undocumented configuration options which took me a little while to figure out.   I did find it challenging with some of the documentation to get single bundles running by themselves and more challenges (and less documentation) about how to get them all up and running together and had to resort to a lot of Google searches and trial and error methods.</p>
<p><span id="more-684"></span>Over the next few weeks I intend to write a mini series of blog posts on the Sonata Project bundles and hopefully provide an easy to follow guide for installing these and getting them working together.  The main topics I intend to cover are (this is subject to change)</p>
<ul>
<li><a title="Chapter 1- Installing and Configuring Symfony2" href="http://www.chrisshennan.com/2012/02/23/installing-and-configuring-symfony2/">Chapter 1- Installing and Configuring Symfony2</a></li>
<li><a title="Installing the SonataAdmin Bundle" href="http://www.chrisshennan.com/2012/03/29/installing-the-sonataadmin-bundle/">Chapter 2 &#8211; Installing SonataAdminBundle</a></li>
<li>Chapter 3 &#8211; Manage Your Models using SonataAdminBundle</li>
<li>Chapter 4  &#8211; Installing SonataPageBundle</li>
<li>Chapter 5 &#8211; Add a CKEditor block</li>
<li>Chapter 6  &#8211; Installing SonataNewsBundle</li>
<li>Chapter 7 &#8211; Installing SonataMediaBundle</li>
<li>Chapter 8 &#8211; Add a customer resizer for the SonataMediaBundle</li>
</ul>
<p>Hopefully some of you will find this useful and any feedback is gladly received.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2012/02/16/symfony2-and-sonata-project-bundles/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>#htmlmovies – A bit of nerd humour</title>
		<link>http://www.chrisshennan.com/2011/08/06/htmlmovies-a-bit-of-nerd-humour/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=htmlmovies-a-bit-of-nerd-humour</link>
		<comments>http://www.chrisshennan.com/2011/08/06/htmlmovies-a-bit-of-nerd-humour/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 18:26:15 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[movies]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=638</guid>
		<description><![CDATA[A colleague of mine pointed me in the direction of a humorous twitter hashtag of the IT variety which, with being a web developer I found quite amusing, especially on a friday afternoon.  The hashtag was for #htmlmovies. If you&#8217;ve not already guessed, the basic idea is to convey a film is a clever way [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.colinburnmurdoch.com" target="_blank">colleague</a> of mine pointed me in the direction of a humorous twitter hashtag of the IT variety which, with being a web developer I found quite amusing, especially on a friday afternoon.  The hashtag was for <a title="#htmlmovies" href="http://twitter.com/#!/search/%23htmlmovies" target="_blank">#htmlmovies</a>.</p>
<p>If you&#8217;ve not already guessed, the basic idea is to convey a film is a clever way using html tags such as</p>
<blockquote><p>&lt;html&gt;&lt;head&gt;&lt;style&gt;EM{color:#F00;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;The hunt for &lt;em&gt;October&lt;/em&gt;&lt;/body&gt;&lt;/html&gt;</p></blockquote>
<p><span id="more-638"></span><br />
or</p>
<blockquote><p>&lt;a href=&#8221;javascript:history.forward()&#8221;&gt;Back&lt;/a&gt;</p></blockquote>
<p>or my favourite so far:-</p>
<blockquote><p>&lt;body id=“reality”&gt;&lt;embed src=“van”&gt;&lt;embed src=“hotel”&gt;&lt;embed src=“snow”&gt;&lt;embed src=“limbo”&gt;&lt;/embed&gt;&lt;/embed&gt;&lt;/embed&gt;&lt;/embed&gt;</p></blockquote>
<p>&nbsp;</p>
<p>Can you work them out?</p>
<p>Hopefully it&#8217;ll keep going as some of them are really quite good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2011/08/06/htmlmovies-a-bit-of-nerd-humour/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Import Product Attributes into Magento</title>
		<link>http://www.chrisshennan.com/2011/04/23/import-product-attributes-into-magento/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=import-product-attributes-into-magento</link>
		<comments>http://www.chrisshennan.com/2011/04/23/import-product-attributes-into-magento/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 14:41:04 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[import product attribute]]></category>
		<category><![CDATA[magento import]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=618</guid>
		<description><![CDATA[I have recently taken on a new web project which is to move an e-commerce website from a custom 3rd party solution over to Magento and before I even got started I hit a road block (you have got to love Magento for that!).  I found that I had to import around 200 product attributes [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently taken on a new web project which is to move an e-commerce website from a custom 3rd party solution over to Magento and before I even got started I hit a road block (you have got to love Magento for that!).  I found that I had to import around 200 product attributes (colours, sizes, etc) from the old online shop to the magento installation and obviously I did not want to enter all these by hand, but where to begin?!</p>
<p>Luckily I came across a post on the Magento forums which details a method for bulk importing product attributes into Magento and although it did not allow me to automate the whole process, it was sufficient for my purposes.<br />
<span id="more-618"></span></p>
<p>The sample code provided in the post allows you to import multiple attributes into Magento but you have to create the attribute in Magento manually before you can import the values as the import does not create non-existing attibutes.  The other problem for me was that the sample code only allowed you to import one attribute at a time and then you had to edit files and id&#8217;s to do the next one.</p>
<p>As I had multiple attributes to import I tweaked the example code (you can <a href="http://www.chrisshennan.com/wp-content/uploads/2011/04/magento-attribute-import-sample.zip">download the tweaked code</a> here) to allow me to import values for multiple attributes at one time.  I still had to create the attributes manually within Magento first but the tweaked code allowed me to import all my attributes values for multiple attributes at once.</p>
<p>In order to import the product attribute values you need to create files in your magento installation within the folder</p>
<blockquote><p>/var/import/attributes/</p></blockquote>
<p>The files need to be in the format of [attribute_id]_[attribute_name].csv i.e. 80_color.csv, 122_size.csv,  techically the _[attribute_name] is not necessary but it helps to make identifying which attribute the file is for a whole lot easier.</p>
<p>Each value for the product attribute need to be in a separate line and the first line needs to contain the word &#8220;admin&#8221;.  For example, 80_color.csv contains:-</p>
<pre>admin
Red
Blue
Green
Purple
Black</pre>
<p>Once you have created the attribute files and copied to other files to their relevant locations you can then open ImpAttributes.php for your Magento installation in your browser i.e. http://www.mysite.com/ImpAttributes.php and all being good, your product attributes should be imported.</p>
<p>I have made the adapted product attributes import for Magento sample code available for download via the link below:-</p>
<h3>Sample Code</h3>
<p>This also contains a sample colours and sizes file</p>
<p><a href="http://www.chrisshennan.com/wp-content/uploads/2011/04/magento-attribute-import-sample.zip">Importing Product Attributes into Magento &#8211; Sample Code</a></p>
<h3>References</h3>
<p><a title="Bulk Import Attributes" href="http://www.magentocommerce.com/boards/viewthread/9391/#t34066" target="_blank">Bulk Import Attributes</a> &#8211; Original solution provided by Srinigenie</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2011/04/23/import-product-attributes-into-magento/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>VPN Issues with O2 Wireless Box II – Firmware Download</title>
		<link>http://www.chrisshennan.com/2011/02/17/vpn-issues-with-o2-wireless-box-ii-firmware-download/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=vpn-issues-with-o2-wireless-box-ii-firmware-download</link>
		<comments>http://www.chrisshennan.com/2011/02/17/vpn-issues-with-o2-wireless-box-ii-firmware-download/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 19:57:00 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Computer Maintenance]]></category>
		<category><![CDATA[o2 broadband]]></category>
		<category><![CDATA[o2 vpn issues]]></category>
		<category><![CDATA[o2 wireless box II]]></category>
		<category><![CDATA[RT-585v7_74K4EJ.exe]]></category>
		<category><![CDATA[vpn firmware]]></category>
		<category><![CDATA[vpn issues]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=609</guid>
		<description><![CDATA[I wrote an article in April 2010 about VPN Issues with O2 Wireless Box II and it has come to my attention that O2 are now putting firmware version 8.2.7.7 on their routers which is supposed to resolve these VPN issues. Apparently this is not always the case and O2 are no longer downgrading the [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote an article in April 2010 about <a href="http://www.chrisshennan.com/2010/04/16/vpn-issues-with-o2-wireless-box-ii/" target="_self">VPN Issues with O2 Wireless Box II</a> and it has come to my attention that O2 are now putting firmware version 8.2.7.7 on their routers which is supposed to resolve these VPN issues.  Apparently this is not always the case and O2 are no longer downgrading the firmware because it is &#8220;fixed&#8221; in the 8.2.7.7 version.  Some people are finding it difficult to get any support, and the O2 CD which you can download no longer has the older 7.4.20.4 firmware.</p>
<p>Fear not though&#8230; I did a little digging around and managed to located the 7.4.20.4 firmware (RT-585v7_74K4EJ.exe) and I have upload it for you.</p>
<p><a href="http://www.chrisshennan.com/wp-content/uploads/2011/02/RT-585v7_74K4EJ.exe">Download the O2 Firmware 7.4.20.4 (RT-585v7_74K4EJ.exe) for the O2 Wireless Box</a></p>
<p>Just remember and disable O2&#8242;s ability to come in an auto-upgrade you otherwise it will not be long till you are be back to square one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2011/02/17/vpn-issues-with-o2-wireless-box-ii-firmware-download/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Is Auto-Tweeting Bad?</title>
		<link>http://www.chrisshennan.com/2011/02/16/is-auto-tweeting-bad/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=is-auto-tweeting-bad</link>
		<comments>http://www.chrisshennan.com/2011/02/16/is-auto-tweeting-bad/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 21:00:34 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[auto tweet]]></category>
		<category><![CDATA[hellotxt]]></category>
		<category><![CDATA[twitterfeed]]></category>
		<category><![CDATA[twitterlive]]></category>
		<category><![CDATA[wordpress auto tweet]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=584</guid>
		<description><![CDATA[Over the few weeks I have taken to reading (yes, honestly I have, and it appears there is a decent amount of worthwhile reading material out there on the web) a few blog entries from SEOmoz, partly because I started to follow SEOmoz on twitter and have been enticed by twitter teasers. One of the points of thought [...]]]></description>
			<content:encoded><![CDATA[<p>Over the few weeks I have taken to reading (yes, honestly I have, and it appears there is a decent amount of worthwhile reading material out there on the web) a few blog entries from <a href="http://www.seomoz.org/" target="_blank">SEOmoz</a>, partly because I started to follow <a href="http://twitter.com/seomoz" target="_blank">SEOmoz on twitter</a> and have been enticed by twitter teasers.</p>
<p>One of the points of thought on a recent blog entry about the <a href="http://www.seomoz.org/blog/tweets-effect-rankings-unexpected-case-study" target="_blank">unexpected effects of a tweet on search engine rankings</a> suggested that auto-tweeting using tools like auto-tweet plugins for WordPress or online services such as Twitterfeed were not as effective as promoting the content.</p>
<p>This peaked my attention, especially since I have been using Twitterfeed for several months to feed my blog to twitter and Facebook and I have, on occasion, noticed decent search engine rankings and quick indexing in Google for some of my topics (mainly my <a href="http://www.chrisshennan.com/2011/01/13/server-backup-using-dropbox-a-5-minute-setup/" target="_self">Server Backup using Dropbox (A 5 Minute Setup) article</a>).</p>
<p>Thus far I have not been able to determine if there is any more weight given to an tweet that is posted manually rather than a tweet which is posted by an automated service like Twitterfeed but I have come across several recommendation why auto-tweeting services are bad and should not be used.<br />
<span id="more-584"></span></p>
<p>Jeremy Lindh brings to light a couple of common sense reasons <a href="http://www.jeremylindh.com/why-you-shouldnt-auto-tweet-your-blog-posts/" target="_blank">why you shouldn&#8217;t auto tweet your blog posts</a> such as</p>
<ul>
<li>The teaser used in the tweet is clear identifiable as being posted by an automated service.  There is no personalisation, nothing to entice your follower to want to read more, words are chopped off and as a result it is generally recognised by many people as spam tweets and instantly skipped over.</li>
<li>Even if people do like your post, it is very unlikely they are going to want to re-tweet your spam-like tweet, and if you can not be bothered creating an intriguing teaser there is no way they are going to do it for you.</li>
</ul>
<p>I have also seen other recommendations for not auto-tweeting which include the fact that Twitter is supposed to be a social medium and auto-tweeting puts up a barrier to that social aspect.  A constant stream of nothing but links to your blog posts or products coming from automated services gives a very forced, one directional perspective and does not invite your followers to respond and start discussions.</p>
<p>On a personal note, from my own experience of using the Twitterfeed service, these auto-tweeting services can be very unforgiving.  Earlier in the week I was writing my <a title="Permalink to WordPress, Nginx, PHP Fast CGI and an unprivileged user account" href="http://www.chrisshennan.com/2011/02/13/wordpress-nginx-php-fast-cgi-and-an-unprivileged-user-account/" target="_self">WordPress, Nginx, PHP Fast CGI and an unprivileged user account</a> article and when I hit &#8220;Publish&#8221; I did not realised I had a spelling mistake in the title which resulted in a spelling mistake in the web address.</p>
<p>Within the 2 minutes it took me to realise this, fix it and re-publish the page, Twitterfeed had already picked up the page and posted it to Facebook and twitter with the wrong web address so I had to put 301 redirection in place to ensure the visitors got through to the page.  Normally Twitterfeed would not pick up my new post for about half an hour with the exception of this one case where I would have preferred it.</p>
<p>From this experience and from the recommendations against auto-tweeting I have now opted to stop using the Twitterfeed service and try the personal touch.</p>
<h2>References</h2>
<p>Jeremy Lindh on <a href="http://www.jeremylindh.com/why-you-shouldnt-auto-tweet-your-blog-posts/" target="_blank">Why You Shouldn&#8217;t Auto-Tweet Your Blog Posts</a></p>
<p><a href="http://www.seomoz.org/" target="_blank">SEOmoz</a> &#8211; SEOmoz provides leading SEO software for search marketers worldwide.</p>
<p><a href="http://www.twitterfeed.com" target="_blank">Twitterfeed</a> &#8211; Feed your blog to Facebook, Twitter and more</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2011/02/16/is-auto-tweeting-bad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress, Nginx, PHP Fast CGI and an unprivileged user account</title>
		<link>http://www.chrisshennan.com/2011/02/13/wordpress-nginx-php-fast-cgi-and-an-unprivileged-user-account/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-nginx-php-fast-cgi-and-an-unprivileged-user-account</link>
		<comments>http://www.chrisshennan.com/2011/02/13/wordpress-nginx-php-fast-cgi-and-an-unprivileged-user-account/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 17:55:57 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Apache/Nginx]]></category>
		<category><![CDATA[Computer Maintenance]]></category>
		<category><![CDATA[apache suexec]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx php fastcgi]]></category>
		<category><![CDATA[nginx unprivileged user]]></category>
		<category><![CDATA[phpfastcgi]]></category>
		<category><![CDATA[phpfastcgi unprivileged user]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=563</guid>
		<description><![CDATA[Over the last month or so I have been busy migrating my sites from my old shared hosting to a new server in the Rackspace Cloud and it has not been without it troubles. The first site I transferred was my WordPress blog and after following various resources on setting up Nginx and spawning PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last month or so I have been busy migrating my sites from my old shared hosting to a new server in the Rackspace Cloud and it has not been without it troubles. The first site I transferred was my WordPress blog and after following various resources on setting up <a href="http://www.cyberciti.biz/faq/rhel-fedora-install-configure-nginx-php5/" target="_blank">Nginx</a> and <a href="http://bash.cyberciti.biz/web-server/rhel-fedora-php-fastcgi-initd-script/" target="_blank">spawning PHP FastCGI processes</a> I managed to get everything up and running happily&#8230; or so I thought.</p>
<p>As it turns out I had followed the guide for spawing PHP FastCGI processes to the letter, and that is where the problem lay.  After a few weeks WordPress reported there were various plugins that needed upgrading but I could not do the automatic upgrade and I had trouble uploading new files due to the wrong permission being applied.  After some investigation this lead me to realise that I needed to spawn my PHP FastCGI processes as the unprivileged user the files belonged to, and not nginx as in the original documentation.<br />
<span id="more-563"></span><br />
This led me to further issues in that I was only spawning processes under a single unprivileged user but I was going to have several unprivileged user accounts on this server and all required their PHP FastCGI processes spawned under their user.  With this in mind I tweaked the <a href="http://bash.cyberciti.biz/web-server/rhel-fedora-php-fastcgi-initd-script/" target="_blank">original php_cgi script</a> to allow multiple PHP FastCGI processes to be spawned under different user accounts and you can <a href="http://www.chrisshennan.com/wp-content/uploads/2011/02/php_cgi.txt" target="_blank">download the updated version here</a>.</p>
<p>The main different is that instead on only being able to use 1 configuration file at /etc/sysconfig/phpfastcgi it now uses multiple configuration files located at /etc/sysconfig/phpfastcgi/*.conf</p>
<p>Now all you need to do is drop in a joebloggs.conf with details something like:-</p>
<pre class="brush: bash; title: ; notranslate">
server_ip=127.0.0.1
server_port=9002
server_user=joebloggs
server_group=joebloggs
server_childs=5
pidfile=&quot;/var/run/php_cgi_jogbloggs.pid&quot;
</pre>
<p>Remember, each configuration file will need a unique server_port and a pidfile but now the files can belong to the unprivileged user (joebloggs:joebloggs) which resolved so many issues include file upload and wordpress auto-update issues.</p>
<p>All that is left to do is update the nginx configuration file for the website you are modifying so that it uses the correct port number</p>
<pre class="brush: bash; title: ; notranslate">
location ~ \.php$ {
    root           html;
    fastcgi_pass   127.0.0.1:9002;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  /var/www/joebloggs/website$fastcgi_script_name;
    include        fastcgi_params;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2011/02/13/wordpress-nginx-php-fast-cgi-and-an-unprivileged-user-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doctrine Inflector – Method names for address_1</title>
		<link>http://www.chrisshennan.com/2011/02/02/doctrine-inflector-method-names-for-address_1/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=doctrine-inflector-method-names-for-address_1</link>
		<comments>http://www.chrisshennan.com/2011/02/02/doctrine-inflector-method-names-for-address_1/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 18:54:31 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Diem Project]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[doctrine inflector]]></category>
		<category><![CDATA[method names]]></category>
		<category><![CDATA[method names in php]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=545</guid>
		<description><![CDATA[You have probably come across this already but I have tripped up over this problem a few times. If you have fields in the db like address_1, address_2, address_3 then the _ is not removed when using getter/setter methods i.e. I have been trying to use:- and it needs to be:- I am assuming the [...]]]></description>
			<content:encoded><![CDATA[<p>You have probably come across this already but I have tripped up over this problem a few times.</p>
<p>If you have fields in the db like address_1, address_2, address_3 then the _ is not removed when using getter/setter methods</p>
<p><span id="more-545"></span><br />
i.e. I have been trying to use:-</p>
<pre class="brush: php; title: ; notranslate">
echo $object-&gt;getAddress1()
echo $object-&gt;getAddress2()
</pre>
<p>and it needs to be:-</p>
<pre class="brush: php; title: ; notranslate">
echo $object-&gt;getAddress_1()
echo $object-&gt;getAddress_2()
</pre>
<p>I am assuming the Doctrine Inflector is not removing the _ because the character immediately after it is a number rather than a letter, along the same principles as class names can not start with a number (<a href="http://php.net/manual/en/language.oop5.basic.php" target="_blank">PHP 5 &#8211; The Basics</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2011/02/02/doctrine-inflector-method-names-for-address_1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server Backup using Dropbox (A 5 Minute Setup)</title>
		<link>http://www.chrisshennan.com/2011/01/13/server-backup-using-dropbox-a-5-minute-setup/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=server-backup-using-dropbox-a-5-minute-setup</link>
		<comments>http://www.chrisshennan.com/2011/01/13/server-backup-using-dropbox-a-5-minute-setup/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 21:06:53 +0000</pubDate>
		<dc:creator>Christopher Shennan</dc:creator>
				<category><![CDATA[Computer Maintenance]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[dropbox for linux]]></category>
		<category><![CDATA[dropbox on fedora core]]></category>
		<category><![CDATA[dropbox on server]]></category>
		<category><![CDATA[dropbox on your own server]]></category>
		<category><![CDATA[fedora core]]></category>
		<category><![CDATA[nautilus]]></category>
		<category><![CDATA[nautilus-dropbox]]></category>
		<category><![CDATA[online backup]]></category>

		<guid isPermaLink="false">http://www.chrisshennan.com/?p=496</guid>
		<description><![CDATA[I am one of those people who, despite knowing the risks, fail to make appropriate backups of my work and important data and rely on hope that nothing will go wrong.  Unfortunately I have been caught out on a couple of occasions and I have been after a nice way to backup my data (documents, websites under [...]]]></description>
			<content:encoded><![CDATA[<p>I am one of those people who, despite knowing the risks, fail to make appropriate backups of my work and important data and rely on hope that nothing will go wrong.  Unfortunately I have been caught out on a couple of occasions and I have been after a nice way to backup my data (documents, websites under development, family photos etc) from my home Fedora Core server without me having to really do anything.</p>
<p>I have seen several online backup software solutions, however most have to be configured and managed via GUI applications installed on your computer however as I have been wanting to back up a Fedora Core server which is command line only, this options was not available to me.  A few people suggested <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> to me for sharing files between home and work computers and when looking into <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> I found that it can also be set up with a service on my Fedora Core server and configured to backup the data on my server.<br />
<span id="more-496"></span></p>
<p>The basic steps I performed to setup <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> to backup my Fedora Core server below:-</p>
<p><strong>Note</strong>: You will need to complete the following as root or a user with sudo privileges</p>
<p>1) Create a file called dropbox.repo in /etc/yum.repos.d/ and paste the following text into it</p>
<pre class="brush: bash; title: ; notranslate">
[Dropbox]
name=Dropbox Repository
baseurl=http://linux.dropbox.com/fedora/$releasever/
gpgkey=http://linux.dropbox.com/fedora/rpm-public-key.asc
</pre>
<p>2) Install <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> (and necessary dependancies) using yum</p>
<pre class="brush: bash; title: ; notranslate">yum install nautilus-dropbox</pre>
<p>3) Create the file /etc/sysconfig/dropbox and add a line similar to the one below to specify which users are allowed to run <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> (substitute user1 and user2 as appropriate)</p>
<pre class="brush: bash; title: ; notranslate">DROPBOX_USERS=&quot;user1 user2&quot;</pre>
<p>4) Download the startup script for Fedora Core from <a href="http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall/FedoraStartup" target="_blank">http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall/FedoraStartup</a> and it save to /etc/rc.d/init.d/dropbox</p>
<p>5) Set the permissions on the configuration and startup script files for <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a></p>
<pre class="brush: bash; title: ; notranslate">
chmod 755 /etc/rc.d/init.d/dropbox
chmod 644 /etc/sysconfig/dropbox
</pre>
<p>6) If you want <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> to start automatically when the system is restarted, run the following command</p>
<pre class="brush: bash; title: ; notranslate">chkconfig dropbox on</pre>
<p><strong>Note</strong>: If you wish to run <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> as a user other than root then switch to that user before running the following commands:-</p>
<p>7) Run the following command and install the proprietary daemon required to run <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> as a service</p>
<pre class="brush: bash; title: ; notranslate">dropbox start -i</pre>
<p>8) Once installed run the command again and copy and paste the URL you are given into a web browser and log into your <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> account or sign up for a new account to link this server to that Dropbox account.</p>
<p>9) Start the service by running the following command (as root or via sudo)</p>
<pre class="brush: bash; title: ; notranslate">/etc/rc.d/init.d/dropbox start</pre>
<p>9) All that is left to do is symlink the folders you want backed up into the <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> folder (which can be found in the home directory of the user your ran steps 7 &amp; 8 from) and then when you log into your <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> account online you should see there files and folders in your account.</p>
<h2>Pros &amp; Cons</h2>
<p>The benefits I have identified include:</p>
<ul>
<li>Realtime online backup</li>
<li>Do not need to remember and perform backups anymore</li>
<li>Ability to share certain folders meaning you would not necessarily need to sync all the files to your other computers (although this would essentially require multiple dropbox accounts)</li>
</ul>
<p>And the potential pitfalls include:</p>
<ul>
<li>I have several web projects using SVN for version control and all the .svn folders are included within <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a>.  Unfortunately there does not appear to be the usual options I would expect for excluding folders or files.</li>
<li>As <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> treats symlinks as real directories you will need to ensure there are no circular references or <a href="http://www.chrisshennan.com/go/dropbox" target="_blank">Dropbox</a> will continually loop round this circular reference.</li>
</ul>
<h2>References</h2>
<p>Dropbox for linux &#8211; <a href="http://www.dropbox.com/downloading?os=lnx" target="_blank">http://www.dropbox.com/downloading?os=lnx</a></p>
<p>Text Based install for Dropbox for Linux &#8211; <a href="http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall/" target="_blank">http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisshennan.com/2011/01/13/server-backup-using-dropbox-a-5-minute-setup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
