Shin

PHP5 on Snow Leopard

Using PHP5 under Mac OS X 10.6 (Snow Leopard) was a bit of a pain thusfar, because you’re limited to either using the built in PHP5 or building it from scratch. The latter being not for the faint of heart and the first not being ideal either. Although the built in PHP5 is a big improvement over the one supplied with 10.5, it still is lacking some rather standard and useful libraries. With 10.5 this was easily remedied by installing Entropy’s PHP5 package, but that hasn’t been updated for 10.6 and it doesn’t look like it will any time soon.
Luckily someone stepped in to fill the void and built his own using Entropy’s build scripts. So you sort of get the Entropy build, except it works.
So thank you very much Taracque, and for the rest of you; go download it here:
http://taracque.hu/php5/

MailServe Snow

How good is it? Good enough to warrant the upgrade to Snow Leopard. That might be a bit of a bold statement but if, like me, you have a site that’s been online since the dark ages you’re undoubtedly bombarded with spam, in the thousands per day. MailServe Snow finally brings bayesian spam filtering to the table and it’s a sigh of relief. Combining the new spam filter options with an RBL like Spamhaus and my inbox finally feels calm again, for lack of better words. And I don’t need to keep mail.app open at all times to try and filter the junk out. It’s finally all taken care of server side, as it should.

How easy was it to upgrade from MailServe Pro for Leopard? Dead easy. Download, install. Launch the old one, save the config and select deinstall from the menu. Start the new one, load the config and you’re up and running.

I rarely rave about software, but if you have a Mac and want to use it as a mailserver you have to get this. I bought it for Tiger, for Leopard and for Snow Leopard and it’s by far the biggest bang for your buck you can get as you’ll have a fully fledged mailserver up and running in literally minutes.

Turning your Mac into a webserver

Here’s how to turn your Mac into a web/mail/ftp server with all the trimmings.
Apache is included and works just fine, just turn on web sharing in you preferences.
If you intend on hosting multiple sites, here’s a rundown on how to configure virtual hosts.
PHP comes included with Leopard but is disabled by default. You could enable it, however, it’s rather limited as a lot of extras aren’t included which can be rather useful on a webserver, such as GD support. It’s therefor better to download and install Entropy’s PHP package.
MySQL, just download and install the official build from here. I might make a followup post covering MySQL’s post install tasks such as setting the root password, creating users and databases from the command line.
Mail. By far the easiest and least hair pulling way to set up a full mailserver is by ploinking down $25 for MailServe Pro (or $15 for MailServe if you don’t care about Dovecot. I do because it’s faster and supports multilevel folder creation). You’ll have your mailserver up and running in under 5 minutes, well worth the money.
FTP, this can be useful if you use a different computer as your client machine, or if you want to allow other people access to your mac for their own sites. For this I use the excellent PureFTPd Manager.
And finally, seeing as you’ll undoubtedly be editing a lot of textfiles and the Mac’s TextEdit can mess them up, get TextWrangler for all your editing needs, it even integrates in your command line.

Work in progress... not home!
Trying to get all/most of the new code working before I start on the eyecandy.