Apache

Install Apache 2, PHP 5.3, and MySQL 5 with MacPorts, Revisited

A few years back I'd written a few tutorials to get a local PHP and MySQL development environment up and running with MacPorts. Much has changed since then, and while I've updated my development environment, I hadn't bothered to update the tutorials. This post aims to bring things up-to-date.

Install Apache 2 and PHP 5 with MacPorts

PHP logo

4/2/08 - Added php.ini settings to use the proper MySQL socket at /tmp/mysql.sock.

3/23/08 - After going through these instructions on a new Leopard system, I made a few minor updates. The steps should now work for Leopard as well as Tiger.

While options abound, MacPorts may be the easiest option to configure a local web development environment on your Mac. I'll mention a few of the other options and then share the steps I've used to install Apache 2 and PHP 5 with MacPorts.