Page 55 - Beginning PHP 5.3
P. 55
Chapter 2: Your First PHP Script
Figure 2-7
Installing on Mac OS X
Mac OS X comes with a version of Apache and PHP already installed. However, it’s likely that the
installed version is somewhat out of date. Furthermore, Mac OS X doesn ’ t come with a MySQL package
installed by default, although it ’ s perfectly possible to install it. (You ’ ll need MySQL or a similar database
system to build database - driven Web sites, as described later in this book.)
As luck would have it, just as Windows has WAMP, Mac OS X has MAMP — an all - in - one, easy -
to - install package that gives you an Apache, MySQL, and PHP setup on your Mac. The great thing about
MAMP (and its Windows WAMP equivalents, for that matter) is that it ’ s self - contained. This means that
it won ’ t mess up any existing server software already installed; all its files are stored under a single
folder; and it ’ s very easy to uninstall later if you want to.
To install MAMP on your Mac, follow these steps:
1. Download the latest MAMP version from www.mamp.info/en/ . (At the time of writing, two
versions are available: MAMP and MAMP PRO. The regular MAMP is fine for the purpose of
developing PHP applications on your Mac.)
2. Open the MAMP .dmg file that you downloaded.
3. In the window that pops up, drag the MAMP folder on top of the Applications folder to install it.
4. Open the MAMP folder inside your Applications folder in Finder, then double - click the MAMP
icon to launch the application.
17
9/21/09 8:50:21 AM
c02.indd 17
c02.indd 17 9/21/09 8:50:21 AM