a few <tags /> short of a page...
about me

Jonathan Who?

My name is Jonathan Edman and I'm a computer professional in the greater metro Atlanta area. I'm also a vegan, historian, veteran, photographer, musician, platelet donor, Model UN nerd, and a meditating Buddhist Christ follower.

You can find out more about a lot of those things on my About Me page, or check out my professional creds on my resume.

Thanks for visiting. If you have a moment, why don't you shoot me an email and say hey.

The Secret....

Friday, March 06, 2009
One of the things that bothers me about using open-source software is the tendency of the open-source community to ignore questions which creates severe problems for those of us who are trying really hard to use open-source tools. There seems to be an attitude that if you don't know enough about apache to parse the httpd.conf you really don't have any place breathing the rarified air that surrounds the folks who can answer you. I am sure I don't have to point out the inherent contradiction there.

Anyway, for the last 10 days or so I've been fighting with 404 errors with my CakePHP server when I was trying to access pages by server/controller/function. Before I go any further, let me point out that there are a LOT of posts on message boards from people with either this or similar problems, but there are NO answers.

I suspected it was a mod_rewrite issue, but I wasn't quite sure, especially because the main Cake page comes up correctly which the Cake docs state is an indication that mod_rewrite is working, and since there are no screen shots in the Cake docs there was no clear indication of what sub-pages should look like. So, when I found that I could access the page by server/index.php/controller/function I just figured that I had been being stupid. Never mind that the sub-pages were all super ugly. So, when I was reading through Cakephp Application Development and happened to see a screenshot of a sub-page with a background and graphics, and... well, no ugly, and then I KNEW I had a mod_rewrite problem. So I started digging for mod_rewrite solutions.

The setup section of the book and it says to make sure that the mod_rewrite module is loaded. Unfortunately there doesn't seem to be an easy way to tell, so I decided to assume that it wasn't loaded. So, after a lot of futzing around with my apache2.conf file (which in an Ubuntu server kind of takes the place of the httpd.conf file) I still wasn't getting anywhere, other than getting confused about where directives were supposed to go. So then I found a wonderful post on an Ubuntu message board explaining how to enable mod_rewrite on an Ubuntu/Apache 2 install. Why mod_rewrite isn't loaded by default is a different question that I'll just raise and walk past. Anyway, there is a post here explaining how to turn on mod_rewrite in the Ub/A2 environment.