Archives For Mac OS X

MAMP Pro

September 11, 2010

I primarily use a Mac for everything I do (and by “primarily” I mean just about 99.9% of the time), and have for years. I’m not trying to start an argument over the best computer, I’m just saying I like the Mac. One of the main reasons I prefer Macs is that it’s Unix (based on Free BSD, since the creation of Mac OS X) without being too Unix-y. For many people I know and work with—great with computers but not a geek, it’s easy to appreciate the nice interface and reliability and features and so forth, without an awareness of the underlying Unix stuff. For me, who regularly works with Web servers, I can do anything on my personal computer just the same as I can on a Web server. When I develop projects on my computer, transferring them to a Web server is completely smooth process. But why is this post about MAMP Pro?

For years, Mac OS X was a 32-bit operating system with a 32-bit version of Apache included. When Mac OS X went to 64-bit, a couple of years back, it started including the 64-bit Apache, too. This caused some problems with PHP, because PHP wasn’t ready as a 64-bit version (or, more specifically, some of the libraries PHP uses weren’t 64-bit ready). Like many people on a Mac, I used Marc’s PHP installer to update my version of PHP, rather than build my own (with some exceptions, like when I wanted to play with PHP 6). So, for some time, it was challening getting PHP to play along nicely with Apache on Mac OS X (one option was to tell Mac OS X to run the 32-bit Apache by default). It’s at this time that I started using MAMP.

MAMP is a all-in-one MySQL, PHP, and Apache installer for Mac OS X (for Windows, XAMPP is the most common equivalent). In my opinion, there are three great things about MAMP:

  • It just works.
  • It doesn’t conflict with the built-in Apache.
  • It’s free.

Really, my only complaint is that MAMP doesn’t, by default, store the databases in a separate directory. If MAMP were to store the databases (MySQL and SQLite) elsewhere, upgrading the version of MAMP wouldn’t overwrite the existing databases. This isn’t a big problem, but would be a nice feature to use. (Conversely, it’s easy in MAMP to use a different directory for the Web files; I use the Sites folder in my home directory, which is more in keeping with the standard of not putting user files in /Applications.)

MAMP comes in a free version that I’ve been using, happily, for years. I’ve thought about upgrading to the Pro version off and on, but, when looking at the features, didn’t see the need. One feature MAMP Pro offers is the ability to use dynamic DNS to serve your sites from your computer, even if your IP address changes regularly (which is the case for most home access). This is not something I do or recommend others do (at the very least, it’s probably a violation of most ISP’s terms). But just the other day I needed a Web site to actually send out email, even while testing it on my computer. I came across a quick fix for MAMP (non-Pro) but that didn’t work for me. So I finally upgraded to MAMP Pro, which I really had intended to do by now anyway (as an act of supporting a product that I value that’s made available for free).

It turns out that I’m so glad I upgraded to MAMP Pro. The cost was $59 (US), which was slightly high, but not unreasonable. MAMP Pro is does not install a new or different version of Apache, PHP, or MySQL, it’s just a nicer interface to the MAMP installation. That may not sound significant, but the interface let’s you control MAMP more easily. For example, the basic MAMP interface looks like this, plus its moderate preferences panel:

MAMP Standard Interface

MAMP Standard Interface

MAMP Standard Preferences

MAMP Standard Preferences

The MAMP Pro interface has many more options. The highlights are:

  • Quickly enabling outgoing mail (even if using a custom SMTP server)
  • Dynamic DNS, as already mentioned (not that I’ll use it)
  • Fine control over all logs, including an easy way to view them (great debugging feature!)
  • Checkboxes for enabling/disabling Apache modules
  • And more
MAMP Pro Interface

MAMP Pro Interface

But what MAMP Pro does, which I was unaware of but appreciate most, is make it really easy to create virtual hosts. I’m frequently working on multiple Web sites at one time. With MAMP standard, to switch back and forth, I had to go into the MAMP panel and change the server directory, then restart MAMP. And when I went to look at another site, I had to repeat this process. With MAMP Pro I just create virtual hosts: somesite1 points to this directory; somesite2 points to this one, etc. Then I just go to http://somesite1:8888 in my Web browser or http://somesite2:8888, etc.

MAMP Pro Virtual Hosts

MAMP Pro Virtual Hosts

For each virtual host, I can also tweak the server settings:

MAMP Pro Virtual Hosts Settings

MAMP Pro Virtual Hosts Settings

This is very useful and it makes me wish I had purchased MAMP Pro a long time ago (and no, I’m not getting paid by MAMP to say this; I have no relationship with them at all). To be clear, MAMP Pro is just a sophisticated interface and there’s nothing that MAMP Pro can do that you can’t do yourself by editing the proper configuration files, going into the command line, etc. These days, for me, I’d rather spend the $59 (US) and have something working the way I need it to, quickly and easily, then to spend a frustrating hour trying to get the right syntax to work in a configuration file.

I consider myself to be pretty cheap, preferring not to spend money if at all possible (my policy is: the money I don’t spend today is money I’ll have not to spend tomorrow). But sometimes it’s worth it to part with some cash. I just learned that MAMP Pro is one of those times.

I’ve recently StumbledUpon just about the best list of free Mac software I’ve ever seen: 100 Incredibly Useful & Free Mac Apps by Mac.AppStorm. Very well organized, this list includes many apps that I’ve not heard of but have since added to my computer. If you scroll through the comments, you’ll find some more recommendations, including several strong recommendations for Alfred, as a QuickSilver replacement (as much as I loved QuickSilver, I’ve since returned to using LaunchBar, as QuickSilver isn’t quite reliable on Snow Leopard).

I recently StumbledUpon BumpTop, a commercial product that greatly changes (dare I say “revolutionizes”?) how you use your computer’s desktop. It runs on both Windows and Mac OS X and is quite reasonably priced. The best way to get a sense of BumpTop is to watch the videos available at their site. It’s just cool.

I came across a product called Alkaline the other day, put out by Litmus. Alkaline is a Mac application that allows you to test a Web site on up to 17 different Windows browsers. It’s much like a Windows-specific version of BrowserShots, but guaranteed to always return quick results and with a few bonus features such as plug-ins that work with common text editors and IDE’s like TextMate or Coda. For more, check out this screencast. You should also check out BrowserShots, if you haven’t already. For the occassional browser test, BrowserShots is fantastic. For more frequent and reliable Windows tests, you may find that Alkaline is worth the money (they have a free version, a day pass, or different subscription rates).

Litmus also makes an application for testing how a newsletter will look in different email clients.

Sometime ago I was asked by someone in the forums if I could assist in setting up SSL on Mac OS X Leopard to enable HTTPS connections. The good news is that after a huge delay, I was able to get this to work, without that much effort. The bad news is that I accomplished this over two different attempts, so my notes may not be foolproof. And, um, I’ve already slightly reconfigured my Apache, so that might come into play. Anyway…

So follow these instructions to make this work. If you have any questions or problems, you can post a comment at the end of this article. In order to pull this off, you will need an administrative password for your computer, a text editor, and the Terminal application. If the Terminal scares you, you probably shouldn’t do this. Continue Reading…