<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>Sean's Obsessions</title>
	<link>http://ertw.com/blog</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sun, 27 Apr 2008 13:35:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Testing via screen scraping</title>
		<link>http://ertw.com/blog/2008/02/29/testing-via-screen-scraping/</link>
		<comments>http://ertw.com/blog/2008/02/29/testing-via-screen-scraping/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 03:50:44 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2008/02/29/testing-via-screen-scraping/</guid>
		<description><![CDATA[Trying to figure out how to write a test based on screen scraping.  Easiest example is to make sure that certain URIs redirect to the login screen.
Created an &#8220;automated&#8221; dir under app/tests/cases/, with a file called permissions.test.php:

&#60;?php

class PermissionsTestCase extends CakeWebTestCase {

        var $mysite = "http://test.mysite.com";
   [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to figure out how to write a test based on screen scraping.  Easiest example is to make sure that certain URIs redirect to the login screen.</p>
<p>Created an &#8220;automated&#8221; dir under app/tests/cases/, with a file called permissions.test.php:</p>
<pre>
&lt;?php

class PermissionsTestCase extends CakeWebTestCase {

        var $mysite = "http://test.mysite.com";
        function setUp() {
        }

        function tearDown() {
        }

        function testMe() {

                $this->setMaximumRedirects(0);
                $result = $this->get($this->mysite . "/");
                $this->assertResponse(302);
                $this->assertHeader("Location", $this->mysite . "/users/login", "Homepage redirects to login");
        }
}
?>
</pre>
<p>The &#8220;setMaximumRedirects&#8221; is there because WebTestCase will, by default, follow 3 redirects.  Here I tell it not to, then I get a page and check the status code and the header.</p>
<p>Lots of stuff you can test specific to a web page: http://simpletest.org/api/SimpleTest/WebTester/WebTestCase.html</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2008/02/29/testing-via-screen-scraping/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How the hell do you test a controller?</title>
		<link>http://ertw.com/blog/2008/02/29/how-the-hell-do-you-test-a-controller/</link>
		<comments>http://ertw.com/blog/2008/02/29/how-the-hell-do-you-test-a-controller/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 03:13:46 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2008/02/29/how-the-hell-do-you-test-a-controller/</guid>
		<description><![CDATA[Testing models is straightforward, see http://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1-2-test-suite
Testing a controller though&#8230;  Why is there nothing good out there that tells you how to test a controller, other than references to Felix&#8217;s work that doesn&#8217;t use simpletest?
That said, testing a controller should look something like
- Create controller object
- Call an action
- Poke at the controller to make [...]]]></description>
			<content:encoded><![CDATA[<p>Testing models is straightforward, see http://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1-2-test-suite</p>
<p>Testing a controller though&#8230;  Why is there nothing good out there that tells you how to test a controller, other than references to Felix&#8217;s work that doesn&#8217;t use simpletest?</p>
<p>That said, testing a controller should look something like</p>
<p>- Create controller object<br />
- Call an action<br />
- Poke at the controller to make sure it looks ok.</p>
<p>To test, I baked a controller and put in one action:</p>
<pre>
&lt;?php
class PrintersController extends AppController {
        var $name = 'Printers';
        function foo() {
                $this->set("something", "some value");
                return 1;
        }
}
?>
</pre>
<p>I then modified the baked test case (tests/cases/controllers/printers_controller.test.php)</p>
<pre>
&lt;?php

App::import('Controller', 'Printers');

class PrintersControllerTestCase extends CakeTestCase {
        var $TestObject = null;

        function setUp() {
                $this->TestObject = new PrintersController();
        }

        function tearDown() {
                unset($this->TestObject);
        }

        function testMe() {
                $result = $this->TestObject->foo();
                debug($this->TestObject);
        }
}
?>
</pre>
<p>After running the test, I could see the methods and variables in the controller.  The stuff I could see testing in the controller is mostly the vars that get passed to the view, so after consulting the debugs I changed testMe() to</p>
<pre>
        function testMe() {
                $result = $this->TestObject->foo();
                $vars = $this->TestObject->viewVars;
                $this->assertEqual($vars["something"],
                     "some value");
                debug($this->TestObject);
        }
</pre>
<p>$vars is an array of the stuff that&#8217;s going to be sent to the view. Logically, if my model tests are correct and I have fixtures set up, the stuff that gets generated by the controller should be predictable and therefore testable.</p>
<p>I also noticed some other entries in the debug output, such as pagetitle.  I&#8217;m sure there&#8217;s more, but this is a good start for now.  Wh</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2008/02/29/how-the-hell-do-you-test-a-controller/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;ll be speaking at Sharkfest &#8216;08</title>
		<link>http://ertw.com/blog/2007/12/25/ill-be-speaking-at-sharkfest-08/</link>
		<comments>http://ertw.com/blog/2007/12/25/ill-be-speaking-at-sharkfest-08/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 16:37:11 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/12/25/ill-be-speaking-at-sharkfest-08/</guid>
		<description><![CDATA[I&#8217;m giving 2 talks on using Wireshark to expose VoIP problems at Sharkfest &#8216;08 (schedule).Worker in a new boost free mobile ringtones maker trend.  Details are sketchy, I think one of the talks is more of a hands on lab, the other is me talking.  I&#8217;ve expanded on my techniques from the Linux [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m giving 2 talks on using Wireshark to expose VoIP problems at <a href="http://www.cacetech.com/SHARKFEST.08/">Sharkfest &#8216;08</a> (<a href="http://www.cacetech.com/SHARKFEST.08/Conf_Sched-122107jas.pdf">schedule</a>).<noscript>Worker in a new <a href="http://groups.google.com/group/lynn5052/web/free-boost-mobile-ringtones">boost free mobile ringtones</a> maker trend.</noscript>  Details are sketchy, I think one of the talks is more of a hands on lab, the other is me talking.  I&#8217;ve expanded on my techniques from the Linux Journal article I wrote on the topic.</p>
<p>Some<noscript>Le but de <a href="http://www.glavaflex.com">casino</a>.</noscript> other fascinating topics going on at the same conference.  Hope to see you there.</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/12/25/ill-be-speaking-at-sharkfest-08/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Frameworks don&#8217;t suck</title>
		<link>http://ertw.com/blog/2007/11/24/frameworks-dont-suck/</link>
		<comments>http://ertw.com/blog/2007/11/24/frameworks-dont-suck/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 04:07:11 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/11/24/frameworks-dont-suck/</guid>
		<description><![CDATA[I&#8217;ve often had a dim view of web frameworks. At b5media we had more than one case where we&#8217;d send out some pretty basic development to be done, and we&#8217;d get it back, done in a framework that took more time to get running than it was worth.  And, from a performance perspective, all [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve often had a dim view of web frameworks. At b5media we had more than one case where we&#8217;d send out some pretty basic development to be done, and we&#8217;d get it back, done in a framework that took more time to get running than it was worth.  And, from a performance perspective, all that overhead has got to slow things down.</p>
<p>Now that I have a tiny bit more time on my hands I&#8217;ve started to try and write some code that I&#8217;ve been meaning to. As I sat down to it I started thinking of all the overhead I&#8217;d have to write &#8212; some authentication, some mapping of URLs to functions, database stuff, and then it hit me &#8212; this is what a framework does.</p>
<p>Given I had no deadline to meet, I decided to try out a framework. I&#8217;m not a Python guy, so Django was out. Rails sounded sexy, but the last thing I needed was to learn a new language, especially one that looks like it was written by someone on crack and that looked more like line noise than Perl.</p>
<p>I&#8217;d rather have picked on in Perl, but knowing that I&#8217;d probably be putting this on a shared host at some point, PHP was probably the best bet.</p>
<p>Symphony caused me no end of grief at b5, so it was out. I ready a bit about Zend but decided it wasn&#8217;t for me.  Code Igniter seemed like too much of a moving target, which left CakePHP. Looking further into Cake it seemed like it was well laid out, had a large community with active development, and does a lot of things Rails does.  What sold it for me was that it was one of the few frameworks that supported PHP4 which is on many shared hosts still.</p>
<p>Over the course of an evening I went through the first 3 <a href="http://www.ibm.com/developerworks/edu/os-dw-os-php-cake1.html">CakePHP tutorials</a> at IBM. Then I picked one of my projects and started slugging through it.</p>
<p>After a couple of weeks I learned the following:</p>
<p>MVC is really good for web apps.  It took me a while to put the SQL generation in the hands of the framework, but most of my queries are simple anyway.  Besides, I can always do $this->Model->Query(&#8221;SELECT blah..&#8221;).<br />
Using a framework gets you up and running fast. Most of my programming is trying something, seeing how it looks, then trying something else. The framework lets me get to that point quickly, especially with scaffolding if I still haven&#8217;t finished a particular model/table.<br />
It&#8217;s not slow at all.  I haven&#8217;t got around to profiling it, but the response time is quick, and it&#8217;s not taking up much space in my opcode cache, no more than Smarty would have<br />
Programming&#8217;s a lot more fun when you let the framework do all the crap work</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/11/24/frameworks-dont-suck/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Skinny controller, fat model</title>
		<link>http://ertw.com/blog/2007/11/14/skinny-controller-fat-model/</link>
		<comments>http://ertw.com/blog/2007/11/14/skinny-controller-fat-model/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 14:35:15 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/11/14/skinny-controller-fat-model/</guid>
		<description><![CDATA[I understand how to work within the MVC (model, view, controller) system of development, but once I read skinny controller, fat model I realized what it&#8217;s all about.  Even though it&#8217;s written for Ruby on Rails it&#8217;s easy enough to transport to your framework of choice.
I&#8217;ve heard the term &#8220;fat model&#8221; before, but really [...]]]></description>
			<content:encoded><![CDATA[<p>I understand how to work within the MVC (model, view, controller) system of development, but once I read <a href="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model">skinny controller, fat model</a> I realized what it&#8217;s all about.  Even though it&#8217;s written for Ruby on Rails it&#8217;s easy enough to transport to your framework of choice.</p>
<p>I&#8217;ve heard the term &#8220;fat model&#8221; before, but really had no idea how to fatten up my model.  Now I know.</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/11/14/skinny-controller-fat-model/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pushing a CakePHP app from dev to prod</title>
		<link>http://ertw.com/blog/2007/11/05/pushing-a-cakephp-app-from-dev-to-prod/</link>
		<comments>http://ertw.com/blog/2007/11/05/pushing-a-cakephp-app-from-dev-to-prod/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 04:27:10 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/11/05/pushing-a-cakephp-app-from-dev-to-prod/</guid>
		<description><![CDATA[After more work on a CakePHP app I wanted to host it somewhere.  Because this is a fairly low volume app I went with a shared hosting provider.
One problem was that I needed two different database connections, one for my development site, and one when I push it to the server.  It was [...]]]></description>
			<content:encoded><![CDATA[<p>After more work on a CakePHP app I wanted to host it somewhere.  Because this is a fairly low volume app I went with a shared hosting provider.</p>
<p>One problem was that I needed two different database connections, one for my development site, and one when I push it to the server.  It was fairly easy to set up two different connections in app/config/database.php:<br />
<code><br />
      var $default = array('driver' => 'mysql',<br />
                'connect' => 'mysql_connect',<br />
                'host' => 'localhost',<br />
                ....<br />
        var $production = array('driver' => 'mysql',<br />
                'connect' => 'mysql_connect',<br />
                'host' => 'PRODUCTION_HOST',<br />
                .....<br />
</code></p>
<p>Then within cake/app_model.php I did a check within the constructor:</p>
<p><code><br />
class AppModel extends Model{<br />
        function __construct($id = false, $table = null, $ds = null) {<br />
                if ($this->isProd()) {<br />
                        $this->useDbConfig = 'production';<br />
                } else {<br />
                        $this->useDbConfig = 'default';<br />
                }<br />
                parent::__construct();<br />
        }<br />
        function isProd() {<br />
                $server = $_SERVER["HTTP_HOST"];<br />
                if ($server ==  "DEVELOPMENT_SERVER") {<br />
                        return false;<br />
                } else {<br />
                        return true;<br />
                }<br />
        }<br />
}<br />
</code></p>
<p>The next order of business was to script pushing code.</p>
<p><code><br />
#!/bin/sh<br />
#<br />
# FTP information<br />
FTPHOST=xxxx.com<br />
FTPUSER="xxxx"<br />
FTPPASS="xxxx"<br />
# do we cd to a dir after logging in?<br />
FTPDIR=.<br />
# path to base of svn<br />
SVNDIR="http://svnserver/svn/project"<br />
TMPDIR=/tmp/$$<br />
#<br />
if [ "x$1" == "x" -o "$1" == "trunk" ]; then<br />
        SVNURL="${SVNDIR}/trunk/"<br />
else<br />
        SVNURL="${SVNDIR}/tags/$1/"<br />
fi<br />
#<br />
echo $SVNURL<br />
mkdir -p $TMPDIR<br />
#<br />
(cd $TMPDIR &#038;&#038; svn export $SVNURL code )<br />
#<br />
(cat - <<SCRIPT<br />
cd $FTPDIR<br />
lcd ${TMPDIR}/code<br />
put  .htaccess<br />
mput -R *<br />
chmod 777 app/tmp<br />
mkdir app/tmp/cache<br />
chmod 777 app/tmp/cache<br />
mkdir app/tmp/logs<br />
chmod 777 app/tmp/logs<br />
mkdir app/tmp/sessions<br />
chmod 777 app/tmp/sessions<br />
SCRIPT<br />
) | ncftp -u $FTPUSER -p $FTPPASS $FTPHOST<br />
#<br />
rm -rf $TMPDIR<br />
</code></p>
<p>This pulls the current code out of subversion (either trunk or a tag) and uploads it to the server.  ncftp is pretty good at only uploading changed files.</p>
<p>In the end I used <a href="http://www.anrdoezrs.net/click-1773671-10368018">1 and 1</a> (aff) and their $4/mo beginner plan that came with a free domain name.  There was one problem with <a href="http://bakery.cakephp.org/articles/view/500-errors-with-1and1-hosting-apache-1-x">500 errors with 1and1</a> that was fixed by changing the .htaccess files (no problems on the dev side either)</p>
<p>The only thing I need to change is to move the isProd() function somewhere that is accessible in the configuration class so that errorlevels are changed depending on the environment.  This could also be taken care of in the svn branch.</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/11/05/pushing-a-cakephp-app-from-dev-to-prod/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A simple authentication system with CakePHP 1.2 and Auth Component</title>
		<link>http://ertw.com/blog/2007/11/04/a-simple-authentication-system-with-cakephp-12-and-auth-component/</link>
		<comments>http://ertw.com/blog/2007/11/04/a-simple-authentication-system-with-cakephp-12-and-auth-component/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 02:44:57 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/11/04/a-simple-authentication-system-with-cakephp-12-and-auth-component/</guid>
		<description><![CDATA[I&#8217;ve been learning the CakePHP framework recently, and came to need a simple user login system.
Judging by the documentation out there, ACLs are the way to do it.  However after spending an hour trying to figure out all the contradicting articles out there I gave up.  ACLs are very precise, all I need [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning the <a href="http://cakephp.org/">CakePHP</a> framework recently, and came to need a simple user login system.</p>
<p>Judging by the documentation out there, ACLs are the way to do it.  However after spending an hour trying to figure out all the contradicting articles out there I gave up.  ACLs are very precise, all I need is a simple &#8220;Sean is logged in&#8221; type of thing.</p>
<p>More reading on the Bakery pointed me to the Auth component, which does exactly what I need.  Again though, I found incomplete documentation, which combined with reading some of the code and trial and error, I figured it out.  What I ended up with was a system that:</p>
<ol>
<li>By default requires users to log in with a username (email) and password</li>
<li>Guests trying to access a protected resource get redirected to the login screen</li>
<li>Controllers can determine which methods need protection and which don&#8217;t</li>
<li>Supports basic groups - registered users are &#8220;users&#8221;, admins are &#8220;admins&#8221;. The controller figures out the rest based on that string</li>
<li>It&#8217;s easily understood, and doesn&#8217;t require a lot of code in each controller</li>
</ol>
<p>So to start I need a user model:<br />
<code><br />
CREATE TABLE `users` (<br />
`id` int(11) NOT NULL auto_increment,<br />
`email` varchar(255) NOT NULL,<br />
`password` char(32) NOT NULL,<br />
`role` varchar(20) NOT NULL default 'user',<br />
`created` datetime default NULL,<br />
`modified` datetime default NULL,<br />
PRIMARY KEY  (`id`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;<br />
</code></p>
<p>The corresponding model code (user.php) is:</p>
<p><code><br />
class User extends AppModel {<br />
   var $name = 'User';<br />
   var $validate = array(<br />
       'email' =&gt; VALID_NOT_EMPTY,<br />
       'password' =&gt; VALID_NOT_EMPTY<br />
   );<br />
   function beforeSave() {<br />
       if ($this-&gt;data['User']['password']) {<br />
            $this-&gt;data['User']['password'] = md5($this-&gt;data['User']['password']);<br />
       }<br />
       return true;<br />
  }<br />
}<br />
</code><br />
As a password is written into the database, it is automatically md5&#8242;ed.</p>
<p>Because I want authentication on every page (with exceptions&#8230;  hang in there) it&#8217;s done at the cake/app_controller.php level in a beforeFilter hook:<br />
<code><br />
class AppController extends Controller {<br />
        var $components = array("Auth");<br />
        function beforeFilter() {<br />
                // Handle the user auth filter<br />
                //  This, along with no salt in the config file allows for straight<br />
                // md5 passwords to be used in the user model<br />
                Security::setHash("md5");<br />
                $this->Auth->fields = array('username' => 'email', 'password' => 'password');<br />
                $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');<br />
                $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'myprofile');<br />
                $this->Auth->logoutRedirect = '/';<br />
                $this->Auth->loginError = 'Invalid e-mail / password combination.  Please try again';<br />
                $this->Auth->authorize = 'controller';<br />
        }<br />
</code></p>
<p>All the $this->Auth lines fill in the various behaviours, such as what the login page is.  Setting &#8220;authorize&#8221; to &#8220;controller&#8221; means each controller must have an isAuthorized() function that returns true or false if the already authenticated user is authorized to do the action.  The key was setting the hash to MD5, because the default is SHA1 and that wasn&#8217;t working with my model I made earlier.  You also must edit your config file to remove the salt.  This behaviour may be recent though, I see some reports that the Auth component uses plaintext passwords which is untrue in HEAD.</p>
<p>With this in place, all pages will require authentication.  To fix that, in the controllers you want to be open, add a beforeFilter:</p>
<p><code><br />
 function beforeFilter() {<br />
                $this->Auth->allow("*");<br />
                parent::beforeFilter();<br />
        }<br />
</code></p>
<p>This will allow all actions in the controller to pass without authentication.  allow() seems to take a list of actions that don&#8217;t need authentication, * means all.  If only a few actions needed authentication, I&#8217;d do $this->Auth->allow(&#8221;view&#8221;, &#8220;foo&#8221;) to allow the view and foo actions to be open.</p>
<p>If you need to see the user that is logged in, use $this->Auth->user(), which returns the model.  From there I can get the role/group, or whatever else I put in there.  It doesn&#8217;t seem you can set() variables for the view in the beforeFilter, so if you want the view to have part of the User model you should set() it elsewhere.</p>
<p>For my login function, I stole it directly from <a href="http://www.littlehart.net/atthekeyboard/2007/09/11/a-hopefully-useful-tutorial-for-using-cakephps-auth-component/">this tutorial</a>.  (Actually most of what I did was based on that tutorial, my contribution is really the explanation of the MD5 stuff and the allow() action (the latter which I now see is in his tutorial, just buried down in another section))</p>
<p><code><br />
   if ($this->Auth->user()) {<br />
                        if (!empty($this->data)) {<br />
                                if (empty($this->data['User']['remember_me'])) {<br />
                                        $this->Cookie->del('User');<br />
                                } else {<br />
                                        $cookie = array();<br />
                                        $cookie['email'] = $this->data['User']['email'];<br />
                                        $cookie['token'] = $this->data['User']['pasword'];<br />
                                        $this->Cookie->write('User', $cookie, true, '+2 weeks');<br />
                                }<br />
                                unset($this->data['User']['remember_me']);<br />
                        }<br />
                        $this->redirect($this->Auth->redirect());<br />
                }<br />
</code></p>
<p>The rest of the code is fairly simple, a register action to set up an account, and a logout function to call $this->Auth->logout.</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/11/04/a-simple-authentication-system-with-cakephp-12-and-auth-component/feed/</wfw:commentRss>
		</item>
		<item>
		<title>b5media launches Spekked</title>
		<link>http://ertw.com/blog/2007/10/08/b5media-launches-spekked/</link>
		<comments>http://ertw.com/blog/2007/10/08/b5media-launches-spekked/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 19:46:37 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/10/08/b5media-launches-spekked/</guid>
		<description><![CDATA[b5media has launched an entertainment gateway
Our dev team worked around the clock (literally&#8230; you go Brian!) to get this ready for launch. I think it&#8217;s a great evolution of the channel concept.  Rather than just having a bunch of blogs in a channel, we have this portal to help showcase the best posts, and [...]]]></description>
			<content:encoded><![CDATA[<p>b5media has launched an <a href="http://www.spekked.com">entertainment gateway</a><br />
Our dev team worked around the clock (literally&#8230; you go Brian!) to get this ready for launch. I think it&#8217;s a great evolution of the channel concept.  Rather than just having a bunch of blogs in a channel, we have this portal to help showcase the best posts, and the people behind it.</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/10/08/b5media-launches-spekked/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MythDora and jumpy livetv</title>
		<link>http://ertw.com/blog/2007/09/16/mythdora-and-jumpy-livetv/</link>
		<comments>http://ertw.com/blog/2007/09/16/mythdora-and-jumpy-livetv/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 13:42:21 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/09/16/mythdora-and-jumpy-livetv/</guid>
		<description><![CDATA[After my previous post I ended up wiping my Myth box and installing Mythdora.  Apparently there are some unresolved issues in F7&#8217;s kernel and the ivtv packaging.
Everything worked well except recording was funny. Watching livetv was jumpy&#8230;  Every few seconds the audio and video would stutter. Watching a show on the MVP downstairs [...]]]></description>
			<content:encoded><![CDATA[<p>After my previous post I ended up wiping my Myth box and installing Mythdora.  Apparently there are some unresolved issues in F7&#8217;s kernel and the ivtv packaging.</p>
<p>Everything worked well except recording was funny. Watching livetv was jumpy&#8230;  Every few seconds the audio and video would stutter. Watching a show on the MVP downstairs was interesting because it appeared that it was being played back at 110% speed, and people were talking like chipmonks.</p>
<p>This lead me to <a href="http://g-ding.tv/?q=node/2022">this link</a> which suggested I get rid of the video4linux-kmdl modules and rebuild the saa7127 module from the kernel tree. That post referenced <a href="http://www.gossamer-threads.com/lists/ivtv/users/35059">these instructions</a> which were helpful, but not 100% complete.</p>
<p>First I googled for kernel-2.6.20-1.2962.fc6.src.rpm and found a site with the source RPM for the kernel I was running.  I also needed to find the kernel-devel for this package (kernel-devel-2.6.20-1.2962.fc6.i686.rpm)</p>
<p><code><br />
yum install rpm-build  m4 make gnupg gcc redhat-rpm-config ncurses-devel<br />
cd /usr/src/redhat/SPECS<br />
rpmbuild -bp --target=i686  kernel-2.6.spec<br />
cd /usr/src/redhat/BUILD/kernel-2.6.20/linux-2.6.20.i686/<br />
cd include<br />
ln -s asm-i386/ asm<br />
cd ..<br />
make scripts<br />
make oldconfig<br />
make menuconfig<br />
</code></p>
<p>Then I followed the instructions in the second link to configure the kernel, and build the module</p>
<p><code><br />
make drivers/media/video<br />
make M=drivers/media/video<br />
cp drivers/media/video/saa7127.ko /lib/modules/2.6.20-1.2962.fc6/kernel/drivers/media/video/<br />
depmod<br />
reboot<br />
</code></p>
<p>The instructions worked well, the only hard part was getting the kernel build environment set up. The make was complaining that it couldn&#8217;t find some header files (asm/types.h), and it was that symlink that was needed.</p>
<p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/09/16/mythdora-and-jumpy-livetv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fedora Core 4 to Fedora 7</title>
		<link>http://ertw.com/blog/2007/09/03/fedora-core-4-to-fedora-7/</link>
		<comments>http://ertw.com/blog/2007/09/03/fedora-core-4-to-fedora-7/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 00:01:03 +0000</pubDate>
		<dc:creator>sean</dc:creator>
		
		<category><![CDATA[Linux/Unix/OpenSource]]></category>

		<guid isPermaLink="false">http://ertw.com/blog/2007/09/03/fedora-core-4-to-fedora-7/</guid>
		<description><![CDATA[My MythTV box was sadly out of date, and to use the new scheduling service I needed to upgrade.
DVD problems prevented me from upgrading from the DVD I downloaded.  Luckily I found how to use the PXE image on the DVD to boot.  It&#8217;s pretty nifty, you point your bootloader at the PXE [...]]]></description>
			<content:encoded><![CDATA[<p>My MythTV box was sadly out of date, and to use the new scheduling service I needed to upgrade.</p>
<p>DVD problems prevented me from upgrading from the DVD I downloaded.  Luckily I found <a href="http://fedorasolved.org/installation-solutions/installing-fedora-using-pxe-images/">how to use the PXE image on the DVD</a> to boot.  It&#8217;s pretty nifty, you point your bootloader at the PXE images from the DVD (which I wget&#8217;ted from my workstation), then you boot and do an HTTP based install (mkdir /var/www/html/f7; mount f7.iso /var/www/html/f7 -o loop from the workstation)</p>
<p>Had many problems upgrading the packages because of conflicts with ATrpms.  Ended up deleting all RPMs that had FC4 in the name and then reinstalled them from yum.<br />
<code><br />
rpm -qa | grep fc4 | perl -p  -e 's/(.*)-.*?-.*/$1/' &gt; a<br />
rpm --nodeps -e `cat a`<br />
yum install `cat a`<br />
</code></p>
<p>I&#8217;m not sure why yum had trouble figuring out these dependencies, but this worked well enough.</p>
<p class="tags">Tags: <a href="http://technorati.com/tag/mythtv" title="See the Technorati tag page for 'mythtv'." rel="tag">mythtv</a>, <a href="http://technorati.com/tag/linux" title="See the Technorati tag page for 'linux'." rel="tag">linux</a>, <a href="http://technorati.com/tag/rpms" title="See the Technorati tag page for 'rpms'." rel="tag">rpms</a>, <a href="http://technorati.com/tag/fedora" title="See the Technorati tag page for 'fedora'." rel="tag">fedora</a></p><p>Post from: <a href="http://ertw.com/blog">Sean's Obsessions</a></p>]]></content:encoded>
			<wfw:commentRss>http://ertw.com/blog/2007/09/03/fedora-core-4-to-fedora-7/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
