<?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>Ninetynine.be &#187; CodeIgniter</title>
	<atom:link href="http://ninetynine.be/blog/tag/codeigniter/feed/" rel="self" type="application/rss+xml" />
	<link>http://ninetynine.be/blog</link>
	<description>Just another blog with no useful content on it at all.</description>
	<lastBuildDate>Sun, 08 Jan 2012 10:39:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Use CodeIgniter on localhost with Ubuntu Jaunty</title>
		<link>http://ninetynine.be/blog/2009/05/use-codeigniter-on-localhost-with-ubuntu-jaunty/</link>
		<comments>http://ninetynine.be/blog/2009/05/use-codeigniter-on-localhost-with-ubuntu-jaunty/#comments</comments>
		<pubDate>Sat, 02 May 2009 11:22:55 +0000</pubDate>
		<dc:creator>ruben</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Xampp]]></category>
		<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false">http://ninetynine.be/blog/?p=195</guid>
		<description><![CDATA[Hi, As a PHP developer it comes in handy to run your websites without having to upload them to your server. You can run them on your own computer if you want to, there isn&#8217;t much to it. I also like using the CodeIgniter framework for my projects, this is a really speeds up the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>As a PHP developer it comes in handy to run your websites without having to upload them to your server. You can run them on your own computer if you want to, there isn&#8217;t much to it. I also like using the <a href="http://www.codeigniter.com">CodeIgniter framework</a> for my projects, this is a really speeds up the whole process!</p>
<p>I will take you through the basic steps to set up your localhost to get CodeIgniter running.<br />
<strong><br />
1) Use Synaptic package manager to install &#8220;apache2&#8243;, &#8220;php5&#8243; and &#8220;mysql-server&#8221;.</strong></p>
<p>During the installation you will be asked to enter the password for the root user for your mysql-server.</p>
<p><strong>2) Create a symbolic link, so that when you go to localhost in your browser, you get the website you want.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> www<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>website www</pre></div></div>

<p>Always look before you delete something with &#8220;rm -r&#8221;, normally there should only be a index.html file in your www/ folder.</p>
<p>I prefer creating a link to my website that I put somewhere in my home directory, as this is being back-upped frequently, and is on another partition.<br />
<br/><span id="more-195"></span><br />
<strong><br />
3) Install the package &#8220;phpmyadmin&#8221; through synaptic.</strong></p>
<p>It is important that you wait to install phpmyadmin until you have installed the other packages and created the symbolic link. Otherwise it can be a mess to get things running.</p>
<p><strong>4) To allow mod-rewrite, to get the clean CodeIgniter URL&#8217;s, you need to do the following.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod rewrite
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>default</pre></div></div>

<p>You will see something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">        DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options FollowSymLinks
                AllowOverride None
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/&gt;</span>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Change the AllowOverride&#8217;s to All.</p>
<p><strong>5) Restart Apache</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>This wasn&#8217;t so hard, and it really makes life easier!</p>
<p>Note: You can&#8217;t use the function mail() or CodeIgniter&#8217;s mail-class without further configuration. I won&#8217;t go into details about this.</p>
<p>Also note that there are many ways to tackle this, this is only one easy suggestion. If you need to switch a lot between different websites, then changing the symbolic link each time is too much work. You can check out <a href="http://www.debian-administration.org/articles/412">this article here</a>.</p>
<p>Happy coding!</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://ninetynine.be/blog/2009/05/use-codeigniter-on-localhost-with-ubuntu-jaunty/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

