The article is on the wiki, check it out if you have a minute and see what you think.

Ampache is basically a webservice that will remotely serve up the media on your mediacenter. This is a fundamental component of my long-term plans for world domination (or rather world subterfugation). You can play your music (yes, ALL of your music) through a browser once you have ampache set up. It’s a typical LAMP setup and takes about 10 seconds if you’re familiar with LAMP.

The “nice” linux client is supposed to be Amarok. Now, I am grateful that a nice client exists. And Ampache is the best thing since the best thing since sliced bread. But when developers don’t follow the Good Rules and intentionally create difficult installation situations for everyone, it really pisses me off. Here’s a quick cheatsheet to get you (me) through the bullshit:

  • Edit [/etc/mysql/my.cnf]
# Comment out this line so that mysql allows connections other than from localhost (ie so you can connect from your LAN).
# I DO NOT appreciate having to do this and you should make sure you follow up with solid firewall rules.
# But Amarok wants direct access to your LAN's db server, so there you have it.
#bind-address				= 127.0.0.1
  • Set up a mysql amarok user and database in standard mysql fashion.  Make sure the user has full remote access (not just from localhost).
  • Now run ampache. This is just weird, but just do it. Ampache starts off fine for web acccess but to allow clients like Amarok to connect you have to add some ACL bullshit – it starts off totally locked down and disabled. Ampache->log in as admin->Admin tab->Show ACL’s->Add API/RPC Host->Add an entry. Use any name you want, make sure you pick RPC + ALL, and put in a start/end that matches your LAN IP range. Click Create ACL and three weird entries will be created for you. WHATEVER.
  • Start amarok for the first time. It will fail because you don’t have a database set up yet. Settings->Configure Amarok->Database->Fill it out! It should work now that you opened up mysql in the first step. Then you’ll have to shut it down and restart.
  • With a little luck you’ll finally be able to play some music.

I have been fighting with MythTV, trying to get it to play my videos for over a month. I have played with my MythTV compilation settings, tried turning off OpenGL, changing the video profile to “Slim”, recompiling my ATI video drivers, and messing with my X configuration. I finally solved it by deleting the installation and reinstalling:

su -
rm /usr/lib64/libmyth*
rm /usr/bin/myth*
(reinstall mythtv)

This messy post brought to you by the iPhone’s Dragon NaturallySpeaking app thank you very much…

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.