...more recent posts
This message board has answers to a lot of my OSX questions.
Well it's frustrating, but that makes any small amount of progress fun. I've spent the entire morning trying to get mod_rewrite to work correctly. That's a module for the apache web server that allows (the way I am using it) for me to send every request - regardless of path - to one central php script for execution. All my sites are built around this ploy so that I can have regular looking URLs that all call the same script which assembles the apparently static pages on the fly from the mysql database. Without mod_rewrite I'd have to have URLs like:
www.digitalmediatree.com/page.php?path=/jim/weblog/
which would call the php program page.php and pass it a variable (here $path) with the page path I want. Besides being ugly, some search engines don't like the '?' in the path and won't follow such links. With mod_rewrite I can accept URLs like:
www.digitalmediatree.com/jim/weblog or
www.digitalmediatree.com/treehouse/comment/1143 or
www.digitalmediatree.com/arboretum/archive/2001/12
and have each request actually invoke the same php script (like page.php) which can then parse the request path (/jim/weblog or /treehouse/comment/1143) and figure out what page to call from the database. These two examples produce the same result - either calling the central script in the URL like the first one and passing the page variable to it on the end of the URL, or using mod_rewirte to invisibly force the calling of the central script and having the script extract the variable from the request_uri environment - but the later way yields better looking URLs, and that turns out to be pretty important on the web.
Anyway, like most problems this one turned out to be fairly simple. But that doesn't mean the time to find a solution is short. Apple ships Apache with the 'AllowOverride' directive set to 'none'. This foils the use of .htaccess files for mod_rewrite rules. Changing the httpd.conf line to 'AllowOverride all' solves the problem.
The rest should be fairly easy but boring work of changing some file system specific paths from what they are on the linux server to what they need to be on my iMac. If I was a better programmer I would have had all of that stuff in some sort of configuration file so I didn't have to go back through all the individual php files. I'll try to implement that more tidy centralized system this afternoon.
Here's a couple of very off color balanced photos of 76 Clinton (Alias Restaurant.) These were taken on 12/27/2001, so work has progressed slightly since then. I believe 2/1/2002 is now the tentative opening day.
My local email client was not checking my digitalmediatree.com email account for the last few days (operator malfunction.) I think I'm caught up now. Sorry if you were temporarily ignored.
It's weird how Apple has root disabled by default. That threw me a little. In any case, I finally have apache, php, and mysql all running locally on my little iMac. 512 megs of additional RAM are on the way. I can't tell you how great this is. Being able to develop on my local machine - without FTPing every change to my server over a 56K dialup - is about the best thing I can think of.
Hopefully by the end of today I'll have this site replicated at home. And of course the ease of setting this up under OSX is making me think of strange distributed scenarios where every user has the full system replicated on his/her home computer, and everything is synched through a central server. That way traffic spikes (ha!) could be handled by a round robin configuration of all the users. I just wish that internet access was developing in such a way that casual serving was possible. Unfortunatley it seems like the big providers want you to consume but not serve. Still, there are always ways around.
One interesting thing I noticed is that even on my dial up (upstairs, not down in the office) my web server is accessible from the outside. Granted the IP address would change every time I got disconnected, so it's not very practicle, but I wouldn't have expected it to work at all. When I get something up here I'll post the IP address and you can try to hit my iMac from where you are. Because, you know, edge of the seat excitement is what we're all about.
I miss lemonyellow.com and sevencrabrangoon.com.
Of course what I really need is a $500 rechargable fleece jacket that heats itself.