<?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>K. Aning&#039;s Web Log</title>
	<atom:link href="http://blog.kaning.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.kaning.co.uk</link>
	<description>Web development for the inexperienced and mildly skilled</description>
	<lastBuildDate>Mon, 31 Oct 2011 10:20:16 +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>Web frameworks for Scala</title>
		<link>http://blog.kaning.co.uk/archives/316</link>
		<comments>http://blog.kaning.co.uk/archives/316#comments</comments>
		<pubDate>Tue, 11 Oct 2011 14:37:21 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[play framework]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=316</guid>
		<description><![CDATA[The best way for me to learn a language generally is to build a project using that language. I have decided to start on this Scala journey and so far it&#8217;s been all theory and very little practice. In any &#8230; <a href="http://blog.kaning.co.uk/archives/316">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The best way for me to learn a language generally is to build a project using that language. I have decided to start on this Scala journey and so far it&#8217;s been all theory and very <a title="First Scala Attempt" href="http://github.com/kaning/ini-file-reader" target="_blank">little practice</a>. In any case I have always been a web developer and that is where I would like to stay. So a web project in Scala is naturally the path I would want to go with. I kept stumbling across the <a title="Lift Framework" href="http://liftweb.net/" target="_blank">Lift framework</a>, I like Lift but it&#8217;s a bit tricky for me right now at this level and so I will perhaps visit it later.</p>
<p>I then came across the parsimonious <a title="Scalatra" href="http://www.scalatra.org/" target="_blank">Scalatra</a>. I love it it&#8217;s light elegant and doesn&#8217;t require you to do too much to get started. I have not used it long enough to say that this is going to be my weapon of choice for any future developments but it&#8217;s a very strong candidate.</p>
<p>I only just now discovered the Play framework and on first glance it&#8217;s a brilliant looking MVC framework, honing in on my Zend experience with PHP. It feels like Zend, I have not actually started writing anything in it yet but I am going to attempt a full blown web project in it and see how that goes. Perhaps something for an EC2 instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/316/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting Up SBT on Ubuntu</title>
		<link>http://blog.kaning.co.uk/archives/311</link>
		<comments>http://blog.kaning.co.uk/archives/311#comments</comments>
		<pubDate>Thu, 29 Sep 2011 11:56:15 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=311</guid>
		<description><![CDATA[So I have had to re-install my OS several times over the past month mainly due to my impatience (installing 11.10 beta and not having it working properly) and I have found that my SBT configurations generally evaporate with every &#8230; <a href="http://blog.kaning.co.uk/archives/311">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I have had to re-install my OS several times over the past month mainly due to my impatience (installing 11.10 beta and not having it working properly) and I have found that my SBT configurations generally evaporate with every re-installation so I wrote a little script to automate the whole process. A bit like my previous get Scala script so once again just copy and paste this into a text file, make it executable with chmod +x &lt;filename&gt; and run it</p>
<pre class="brush:shell">#!/bin/bash

cd ~

echo --------------------------------------------------------------------------------------------
echo - Getting SBT Launcher
echo --------------------------------------------------------------------------------------------
wget http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.0/sbt-launch.jar

printf 'java -Xmx512M -jar `dirname $0`/sbt-launch.jar "$@"' &gt; sbt

chmod +x ./sbt

echo --------------------------------------------
echo - Move sbt and sbt-lauch to share
echo --------------------------------------------

sudo mv sbt /usr/share/sbt
sudo mv sbt /usr/share/sbt-launch.jar

echo --------------------------------------------------------------------------------------------
echo - symlinking sbt and sbt-lauch to /usr/bin/{sbt, sbt-lanch.jar}
echo --------------------------------------------------------------------------------------------
sudo ln -s /usr/share/sbt /usr/bin/sbt
sudo ln -s /usr/share/sbt-launch.jar /usr/bin/sbt-launch.jar</pre>
<p>I suppose, when I get time I can make this accept parameters so you can specify the version of SBT you want and the file name you want to use etc but for now this should suffice&#8230;<br />
comments welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/311/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Scala on Debian Based Systems (e.g Ubuntu)</title>
		<link>http://blog.kaning.co.uk/archives/306</link>
		<comments>http://blog.kaning.co.uk/archives/306#comments</comments>
		<pubDate>Mon, 15 Aug 2011 14:39:06 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=306</guid>
		<description><![CDATA[Having followed instructions from here, which I thought was really easy, I put together a little bash script to do exactly that. And being a sucker for the latest I went with the 2.9.0.1 installation. I am honestly not sure &#8230; <a href="http://blog.kaning.co.uk/archives/306">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having followed instructions from <a title="Installing Scala" href="http://wiki.summercode.com/how_to_install_scala_on_ubuntu_scala_2_8_1_and_ubuntu_10_04" target="_blank">here</a>, which I thought was really easy, I put together a little bash script to do exactly that. And being a sucker for the latest I went with the 2.9.0.1 installation.<del> I am honestly not sure why Ubuntu still has 2.7.7 in its repository</del>. Ubuntu 11.10 (oneiric)  now has scala 2.9.x so you may want to use that instead of this script but if you want to keep up to date with the latest Scala release then:</p>
<p>Simply copy this and paste into a file, name it whatever you want, and make it executable with chmod +x</p>
<pre class="brush:shell">#!/bin/bash

cd ~

echo --------------------------------------------------------------------------------------------
echo - Getting Scala 2.9.0.1
echo --------------------------------------------------------------------------------------------
wget http://www.scala-lang.org/downloads/distrib/files/scala-2.9.0.1.tgz

echo --------------------------------------------------------------------------------------------
echo - Decompressing
echo --------------------------------------------------------------------------------------------
tar zxf scala-2.9.0.1.tgz

echo --------------------------------------------------------------------------------------------
echo - moving scala to /usr/share/scala
echo --------------------------------------------------------------------------------------------
sudo mv scala-2.9.0.1 /usr/share/scala

echo --------------------------------------------------------------------------------------------
echo - Symlinking executables
echo --------------------------------------------------------------------------------------------
sudo ln -s /usr/share/scala/bin/scala /usr/bin/scala
sudo ln -s /usr/share/scala/bin/scalac /usr/bin/scalac
sudo ln -s /usr/share/scala/bin/fsc /usr/bin/fsc
sudo ln -s /usr/share/scala/bin/sbaz /usr/bin/sbaz
sudo ln -s /usr/share/scala/bin/sbaz-setup /usr/bin/sbaz-setup
sudo ln -s /usr/share/scala/bin/scaladoc /usr/bin/scaladoc
sudo ln -s /usr/share/scala/bin/scalap /usr/bin/scalap</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/306/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL and Scala &#8211; Simple selects</title>
		<link>http://blog.kaning.co.uk/archives/298</link>
		<comments>http://blog.kaning.co.uk/archives/298#comments</comments>
		<pubDate>Fri, 29 Jul 2011 09:45:11 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=298</guid>
		<description><![CDATA[So after about an hour of research and experimenting, I found out how to make Scala work with MySQL without too much hassle, I found a really helpful guide here. Going down the SBT route, I first created a project &#8230; <a href="http://blog.kaning.co.uk/archives/298">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So after about an hour of research and experimenting, I found out how to make Scala work with MySQL without too much hassle, I found a really helpful guide <a title="Simple order application" href="https://github.com/ollekullberg/SimpleOrder" target="_blank">here</a>. Going down the SBT route, I first created a project and all that, then inside of the build folder I created a Scala class that ensured that when I started building, I would have the right dependencies downloaded and ready.</p>
<pre class="brush:scala">import sbt._

class MyDataEngineProject(info: ProjectInfo)
    extends DefaultProject(info) {
  // Declare MySQL connector Dependency
  val mysql = "mysql" % "mysql-connector-java" % "5.1.17"
}</pre>
<p>Once you have got this in project/build/MyDataEngineProject.scala, you are ready to start the connection stuff. In src/main/scala you can start creating your application here. I use the &#8220;def main&#8221; approach so when i start from the command line i simply pass in my parameters and I&#8217;m ready to go:</p>
<pre class="brush:scala">import java.sql.{Connection, DriverManager, SQLException, ResultSet}

object DataEngine {

	private var driverLoaded = false

	private def loadDriver()  {
		try{
			Class.forName("com.mysql.jdbc.Driver").newInstance
			driverLoaded = true
		}catch{
			case e: Exception  =&gt; {
			    println("ERROR: Driver not available: " + e.getMessage)
			    throw e
			}
		}
	}

	def main(args: Array[String]) {
		if (args.length &lt; 1){
			println("No arguments provided, exitting...")
			return
		}
		println ("Attempting to load MySQL JBDC Driver...")
		println
		this.synchronized {
		  if(! driverLoaded) loadDriver()
		}

		val conString = "jdbc:mysql://localhost:3306/db_name?user="+args(0)+"&amp;password="+args(1)
		classOf[com.mysql.jdbc.Driver]
		val con = DriverManager.getConnection(conString)
		try{
			val handle = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)
			val rs = handle.executeQuery("select * from auth limit 1")
			println ("Connection established...")
			while(rs.next){
				println("User Handle: "+rs.getString("handle"))
			}
		}catch{
			case e: Exception  =&gt; {
		    	println("ERROR: No connection: " + e.getMessage)
		    	throw e
		  	}
			case _ =&gt; println("A problem!")
		}finally{
			println("Closing connection and exiting...")
			con.close()
		}
  	}
}</pre>
<p>Save the file as Main.scala and you can just type in run with your db username and password as space-separated arguments and you&#8217;re ready to go. Of course you will need to change some bits in here to reflect your database schema, but aside that it&#8217;s that simple. In my next post I will work on inserting data and updating data as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/298/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to Scala</title>
		<link>http://blog.kaning.co.uk/archives/290</link>
		<comments>http://blog.kaning.co.uk/archives/290#comments</comments>
		<pubDate>Tue, 26 Jul 2011 13:49:02 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Lift]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[lift]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=290</guid>
		<description><![CDATA[So after about 8 &#8211; 9 years of PHP and enjoying it thoroughly, I have decided to default to Scala pronounced {skah-lah}. I am not going to go into any reasons why I am moving but all I can say &#8230; <a href="http://blog.kaning.co.uk/archives/290">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So after about 8 &#8211; 9 years of PHP and enjoying it thoroughly, I have decided to default to Scala pronounced {skah-lah}. I am not going to go into any reasons why I am moving but all I can say is that, I think the Lift Framework is amazing and Scala is a lot more elegant in my opinion, very expressive and perhaps my biggest reason is that I would like to expand those horizons, (I was getting a bit too comfortable in this space).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/290/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using images in LaTeX</title>
		<link>http://blog.kaning.co.uk/archives/261</link>
		<comments>http://blog.kaning.co.uk/archives/261#comments</comments>
		<pubDate>Fri, 08 Apr 2011 06:43:48 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Academic]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=261</guid>
		<description><![CDATA[Note to self and perhaps others who might be wondering why your images are not displaying in your tex document. Despite using the correct syntax: &#160; &#160; \begin{figure}[htb] \begin{center} \includegraphics{image.png} \end{center} \caption{Fig 1: image} \label{fig1} \end{figure} You may find a &#8230; <a href="http://blog.kaning.co.uk/archives/261">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Note to self and perhaps others who might be wondering why your images are not displaying in your tex document.</p>
<p>Despite using the correct syntax:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><code></p>
<pre class="brush:shell">\begin{figure}[htb]
    \begin{center}
        \includegraphics{image.png}
    \end{center}
    \caption{Fig 1: image}
    \label{fig1}
\end{figure}</pre>
<p></code><br />
You may find a box with with only the image path being displayed as your image. Please check that you are not using the &#8220;draft&#8221; argument at the top of your document when specifying your document class. A bit like</p>
<pre class="brush:php">\documentclass[12pt,a4paper,draft]{article}</pre>
<p>Make sure there is no &#8220;draft&#8221; in there so that it reads</p>
<pre class="brush:php">\documentclass[12pt,a4paper]{article}</pre>
<p>Spent about half an hour trying to figure out why everyone else&#8217;s images were displaying except mine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/261/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LyX</title>
		<link>http://blog.kaning.co.uk/archives/257</link>
		<comments>http://blog.kaning.co.uk/archives/257#comments</comments>
		<pubDate>Sat, 26 Feb 2011 23:23:31 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Academic]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=257</guid>
		<description><![CDATA[So on recommendations I have installed LyX. I am actually writing this on LyX now. I just thought I should post my thoughts on this programme. I am not sure why I had not tried this first, it is mainly &#8230; <a href="http://blog.kaning.co.uk/archives/257">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">So on recommendations I have installed LyX. I am actually writing this on LyX now. I just thought I should post my thoughts on this programme.</div>
<div></div>
<div id="_mcePaste">I am not sure why I had not tried this first, it is mainly a WYSISYG editor that outputs LaTeX source or any other LaTeX-like source code for that matter. So you can type documents up as you would in a normal text editor and then not have to worry about all that LaTeX markup that you need to make it look like it should because there are a myriad of buttons you can use for styling.</div>
<div></div>
<div id="_mcePaste">I will start first with the interface. It seems very simple to use very straight forward. With the version I am using 1.6.7, I have a choice of two interfaces “Default” and “Classic” I noticed only a few differences between where menu items were placed and the toolbar buttons.</div>
<div></div>
<div id="_mcePaste">The best thing about this is programme is that you can easily use it to learn a lot more about LaTeX mark up just by being productive, this I like.</div>
<div></div>
<div id="_mcePaste">The insert command also gives you a drop down of almost everything you would need to insert in a document, from citations to images, labels to index entries unless you&#8217;re doing some very custom layouts and so on chances are that LyX will probably have what you need as a simple menu item. Then again I haven&#8217;t been using LaTeX long enough to be sure about this.</div>
<div></div>
<div id="_mcePaste">I don&#8217;t think I can give a very comprehensive review as I installed and only started using it this evening, but what I think stands it apart from every other editor I have tried is the version control that comes with it. I am not sure what backend manages this yet as I have not delved deeply into it but my first attempt at an “initial commit” failed. I will have to look into this further.</div>
<div></div>
<div id="_mcePaste">You can also split your screen between the WYSIWIG view and the source where you see valid LyX/LaTeX source being generated as you put your document together as though it were a full blown word processor.</div>
<div></div>
<div id="_mcePaste">My first impressions of this is that I love it and it is a strong contender to LaTeXilla, which I installed and have been using till now. I will give this one a try this week and see how it works for me. I have to re-iterate though that the good thing about open source and these things in general is that you don&#8217;t have to choose one as you have not shelled out tonnes of money for a license&#8230;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/257/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX editors</title>
		<link>http://blog.kaning.co.uk/archives/253</link>
		<comments>http://blog.kaning.co.uk/archives/253#comments</comments>
		<pubDate>Sun, 13 Feb 2011 15:17:37 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Academic]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=253</guid>
		<description><![CDATA[I have been looking into LaTeX (pronounced La Tek) editors for my writing now and after a lot of trials and tribulations, I finally settled on LateXila. Not only does it look identical to my favourite text editor / IDE &#8230; <a href="http://blog.kaning.co.uk/archives/253">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been looking into LaTeX (pronounced La Tek) editors for my writing now and after a lot of trials and tribulations, I finally settled on LateXila.</p>
<p>Not only does it look identical to my favourite text editor / IDE of all time &#8211; gEdit. It supports syntax highlighting, decent support for BibTex referencing. It also has a very user friendly interface and it&#8217;s also customizable as per any GTK interface in GNOME.</p>
<p>I have not checked if there are versions for other Operating Systems but I am pretty certain anyone wishing to try this out with any Linux distribution can do it with the built in package/software manager, shipped with it.</p>
<p>This is obviously not to say the others do not have advantages over LaTeXila, this is just the one I have felt most at home with. I have tried the LaTex plug-in for gEdit, that is also quite good especially the support you get when using the \cite command, it handily provides a drop down of keys available in any BibTeX files you have referenced in that LaTeX doument. I haven&#8217;t played with LaTeXila&#8217;s preferences extensively so I am not sure if it has that too.</p>
<p>You can find sourceforge page here <a href="http://latexila.sourceforge.net/">http://latexila.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/253/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A note on Zend Pagination</title>
		<link>http://blog.kaning.co.uk/archives/246</link>
		<comments>http://blog.kaning.co.uk/archives/246#comments</comments>
		<pubDate>Tue, 07 Sep 2010 13:52:40 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend_Paginator]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=246</guid>
		<description><![CDATA[Having gone round in so many circles I finally found out that when useing Zend Pagination and the current route you are using has more than one dynamic variable i.e $router-&#62;addRoute( 'listingswithpage', new Zend_Controller_Router_Route( '/listing/:type/:page', array('controller' =&#62; 'listing', 'action' =&#62; &#8230; <a href="http://blog.kaning.co.uk/archives/246">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having gone round in so many circles I finally found out that when useing Zend Pagination and the current route you are using has more than one dynamic variable i.e</p>
<pre class="brush:php">$router-&gt;addRoute(
                'listingswithpage',
                new Zend_Controller_Router_Route(
                        '/listing/:type/:page',
                        array('controller' =&gt; 'listing',
                            'action' =&gt; 'index')
                )
        );</pre>
<p>Your pagination view helper gets a bit thrown if you go by the documentation. The first thing you need to do is find a way to specify the first page initially. I went with specifying my first page in my route definition so it looked something like this</p>
<pre class="brush:php">$router-&gt;addRoute(
                'listingswithpage',
                new Zend_Controller_Router_Route(
                        '/listing/:type/:page',
                        array('controller' =&gt; 'listing',
                            'action' =&gt; 'index',
                            'page' =&gt; 1)
                )
        );</pre>
<p>And that worked. Failing that you have to figure out a way to pass the complete URL path to you pagination view which might be something like &#8220;controls.phtml&#8221; or &#8220;pagination.phtml&#8221;. and constructing the url properly there.</p>
<p>I will perhaps post a more detailed description of what this means but leave a comment if you are impatient and I will try and respond when I get a moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/246/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mod_Rewrite and Zend Framework 1.10.x and Ubuntu</title>
		<link>http://blog.kaning.co.uk/archives/242</link>
		<comments>http://blog.kaning.co.uk/archives/242#comments</comments>
		<pubDate>Mon, 06 Sep 2010 21:22:35 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MVC Frameworks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=242</guid>
		<description><![CDATA[So all the tutorials on configuring your development server to run Zend Framework successfully say that you need to enable mod_rewrite in apache2 so that .htaccess and Zend_Router* works well. What they all say is to make sure it&#8217;s loaded &#8230; <a href="http://blog.kaning.co.uk/archives/242">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So all the tutorials on configuring your development server to run Zend Framework successfully say that you need to enable mod_rewrite in apache2 so that .htaccess and Zend_Router* works well.</p>
<p>What they all say is to make sure it&#8217;s loaded and enabled. I will raise my hand and say it wasn&#8217;t that easy for me to find because Ubuntu lays out Apache2 a little differently from say Fedora. First of all in the /etc/apache2 folder there are a few folders to take note of.</p>
<p>sites-enabled and mods-enabled actually tell you what has been enabled or not and not an uncommented list in some httpd.conf file. Basically the folders in there have symbolic links that come from sites-available and mods-available. This perhaps is a better idea as you can add new mods and not have to recompile apache or whatever.</p>
<p>I digress, to enable mod_rewrite in apache2 in Ubuntu 10.04.1 you need to create a symbolic link from mods-available to mods-enabled to do this you can either use the command:</p>
<pre class="brush:shell">sudo ln -s /etc/mods-available/rewrite.load /etc/mods-enabled/rewrite.load</pre>
<p>or if you prefer GUIs you have to run nautilus as root so you can try</p>
<pre class="brush:shell">sudo nautilus</pre>
<p>and navigate to &#8220;/etc/mods-available&#8221;, right-click on rewrite.load and select &#8220;make link&#8221; and the cut the new file created called &#8220;link to rewrite.load&#8221; paste it in mods-enabled and rename it to &#8220;rewrite.load &#8221;</p>
<p>Now all you need to do is restart your web server and you&#8217;re all set to reroute anyhow you want.</p>
<pre class="brush:shell">sudo /etc/init.d/apache2 restart</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/242/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

