MAMP PRO LogoI’ll admit to being a little lazy. For a long time now I’ve been using MAMP as my local development stack. The advantage of MAMP is that it’s easy. Just download it, install it, and run it. A while back I bought the Pro Version, which has a couple extra bells and whistles, (the added convenience of having everything in one place and easy-peasy set-up of multiple virtual hosts for several projects simultaneously) but for the most part is exactly the same as the free version.

Password Required

The downside of MAMP, even MAMP Pro, is that you always have to enter your user password to start, stop, or restart Apache. It’s been an issue with MAMP for a while. Lots of people have written about it. Many have raised the issue with the MAMP developers but there’s still no resolution, and the MAMP people are notoriously bad at responding to any support issues, not even for their paying MAMP Pro customers. Last year Larry Ullman wrote about why he’s leaving MAMP behind. Nothing’s changed since then. I’ve tried various suggestions for fixing (notably the Josh Frasier’s AppleScript solution, and the corresponding app based on Josh’s solution by Damien Goweda). But, for whatever reason, the AppleScript solution just didn’t work for me.

ampps logoThe Ampps Alternative

The first alternative I tried was Ampps. Larry Ullman’s article had mentioned it and I thought, if it was worth his time to mention, it would be worth my time to look at. I downloaded and installed it, but it wasn’t working. As it happened, I had just upgraded OS to Mavericks (OS X 10.9). Maybe that had something to do with it, I thought. The Ampps documentation said, “If it doesn’t work, send us a support ticket.” So I did. Within 24 hours I had a response. Pretty amazing, considering Ampps is totally free. Way better than MAMP support. As it turned out a change in the new OS X 10.9 was causing my troubles. Within another 28 hours, they had released a patch. I was up and running. But the GUI launcher for Ampps also requires you to enter your password every time you want to start, stop or restart Apache. A little looking around on the Ampps support forums provided another AppleScript method of getting around that, and a promise that they’re working on fixing this in the next release. But, having been down the AppleScript path before, I didn’t want to mess with it. Maybe I’ll try it again after the next version is released.

If You Want Something Done Right…

So, all for the sake of being a lazy slob, I resolved that I’d just do what I’ve been putting off doing for years: I decided to just install my own stack.

On OS X, the Apache part is already there. But with the latest versions, it’s not accessible without a bit of tinkering. For the clearest instructions on activating Apache and getting your stack built, you can’t beat Neil Gee’s step-by-step guides. They worked well. Everything worked! The native apache doesn’t require a password: it just starts itself when you log in.

When You Can’t Leave Well Enough Alone

At that point I decided, since I was going all the way with this, I may as well upgrade php to 5.5.5 (OS X Mavericks ships with 5.4.17). I kept getting errors during the compile phase. (If you have a suggestion about what causes utf8_mime2text() has new signature, but U8T_CANONICAL is missing I’d love to know!)

Homebrew (which is otherwise awesome) kept on running into problems with previously existing perl installations. It’s a known issue, and I could have tracked it down and fixed it, but like I said, I’m a little lazy.

PHP Install’s Magic Bullet

So, I ended up using the one-line installation from the folks at LIIP. This truly is php on OS X’s magic bullet installer. Copy the one line command for whichever php version you’re looking for, paste it into your terminal, and voila! Perfect install in under 30 seconds. (The only thing you might want to do is to edit the /usr/local/php5/php.d/99-liip-developer.ini file to set date.timezone setting to your own timezone afterwards, so you’re not running on Swiss time. But then again, the Swiss have a reputation for accurate watches!)

(Note: After I got done with the LIIP install, I found Neil Gee’s one-line php upgrade. I’d bet that works, too, but I can’t say since I didn’t try it. Comment, anyone? Update: Turns out, Neil’s php update is the same as the LIIP update! Duh!)

Good Luck!

So now I have my own, homemade AMP stack. It wasn’t really the lazy person’s alternative, but it feels damn good to have done it. And, hey! I don’t have to enter my password to start Apache any more, and I can go back to being lazy.

May your adventures installing your own AMP stack be smooth sailing!