This toolkit was written by a guy down the road over in Chapel Hill, it seems. The idea seems to be to generate and configure MVC-structured PHP code with RESTful web access. Supports multiple apps with one installation. Works for me.

I grabbed the 0.20 release. It comes with a web-based front end that will mock up your initial application code. Unfortunately the javascript wasn’t working and it looked like it had a bad path to the embedded jquery library. Rather than kill myself researching, I switched to the git “edge” branch:

cd development/git
git clone http://github.com/recess/recess.git
  Initialized empty Git repository in /home/m/development/git/recess/.git/
git checkout master 
  Already on 'master'

Now it seems to be able to find its css and javascript.

Next problem was with mod_rewrite. It just wouldn’t work. Time to troubleshoot… and fixed. In Recess’ defense, this was probably the reason the 0.20 release didn’t work well.

Next, I went to create an app. I had to change the permissions on the apps directory, as instructed, since I unzipped recess under a group for which apache did not have write access.

Next, I cranked through a model for one of my apps. WOW, now I have a full set of “routes”, URL’s with which to RESTfully access my model. This is looking nice… to be continued…

mod_rewrite is essential if you’re going to write RESTful web services. Here are the steps I went through to troubleshoot my installation:

  1. Ensure you included mod_rewrite in your apache installation. For gentoo, you can use [eix www-servers/apache] – Gentoo’s apache2_modules_rewrite flag is enabled for apache, looks good.
  2. Test to see if it is being loaded. I created a dummy page phpinfo.php with the contents [<?php phpinfo(); ?>], to see what PHP had to say about it. Search for mod_rewrite – yep, there it is, good. If not, make sure it’s loaded in httpd.conf, the load line may be commented out.
  3. Now make sure it’s enabled for the path you’re using. The apache directive is [RewriteEngine On], and it has to be somewhere in your httpd.conf or an included file. In my case I use virtual hosts. According to Apache docs, I needed to add both of these to the top level of my virtual host directive:
    RewriteEngine On
    RewriteOptions Inherit
  4. The mod_rewrite rules I’m dealing with are all in .htaccess files. In that case you have to make sure you’ve turned on the switch that allows .htaccess files to override your settings. Basically, you’ll need [AllowOverride All] enabled for the path where you want to use .htaccess files.
  5. Finally, make sure your .htaccess settings and rules look good. Here’s an example I pulled from another good troubleshooting blog entry:
    cat .htaccess
     Options +FollowSymLinks
     RewriteEngine On
     RewriteRule ^alice.html$ bob.html
     RewriteRule ^bob.html$ alice.html

    It should force bob’s page to load when you request alice’s, and vice versa. Nice simple little test.

Once I went through this list, I was good to go.

My Cyrus IMAP mail server is my very own 20-headed hydra.   It’s mostly well-behaved, but once in a while I have to jump back in the ring with the bitch and wrestle her back into submission. This is not fun, and if you can structure your life in such a way as to avoid it, I would highly recommend it.

The authentication started failing when I went to check my email.  Because I know what a monster the thing is, I put off fixing it for a couple weeks – I just didn’t have 5 hours for the dive back into the internals.  Eventually I really needed some email, so I jumped in.

  • rebuilt cyrus-imap and cyrus-sasl, no luck
  • suspected that sasl was to blame, saslpasswd2 (the tool to manage email account passwords) reported failure
  • played with every authentication setting of sasl, no luck
  • errors were minimal, I monitored logs and googled for the errors I got with no luck
  • FINALLY someone with a similar error was told to try strace, as follows:
    strace -o sasl-out.txt -f sasldblistusers2

    Awesome! It shows all kinds of system calls made by the executable, including reads and writes and logs. And that showed failure during a seek inside my sasldb file.  Holy occam’s razor, batman! Wiped the file and recreated it, and everything is all happy again.

When an unacknowledged text is displayed, alarms stop working on the iPhone. The workaround for me is to turn off texting while I’m sleeping, which is prolly a good idea anyway. 🙂

I bumped up a Windows 7 release candidate install to the retail Windows 7 today.  Microsoft decided it was too much trouble to support an upgrade from the final Windows 7 RC, forcing you to do a completely new installation.  Blow-by-blow:

  • Fire up the Macbook Pro
  • Select System Preferences->Startup Disk->Windows on BOOTCAMP, Restart…
  • Uninstall Bootcamp for Windows (W7 isn’t happy until you do)
  • Install Windows 7
    • you’ll get errors unless you perform a custom install
    • pick the existing C: (BOOTCAMP) drive, the existing Windows folder will be renamed
    • go through the complete installation
  • Insert the Snow Leopard DVD and reinstall Bootcamp for Windows

If you followed this closely, that’s all you should need!  Not that bad.  Now to reinstall all the Windows software… when I get around to it, yawn…