Copyright 2005, Sawyer McFarland Media, Inc. This material is supplied to readers of
Dreamweaver 8: TheMissing Manual
as a helpful supplement to that book. In addition, those interested in the book can try outthis Tutorial. Buy the book and you can access the last 4 PHP tutorials as well.
For more information on XAMPP, included detailed installation and setup instructions visitwww.apachefriends.org/en/xampp-windows.html.
Mac
1.
Download the software at: www.apachefriends.org/en/xampp-macosx.html#849
Select the first installer option (at the time of this writing it’s listed as XAMPP MacOS X 0.5.)You may be taken to a page that gives you a bunch of different places to download from. Just clickone of the download buttons. Once downloaded you’ll have a “package” file on your computer—inother words a file ending in .pkg, like xampp—macosx-0.5.pkg.
2.
Double click the package file.
A window that says “Install XAMPP for MacOS X” appears.
3.
Click the Continue button, select your hard drive in the list that appears and click the Continue buttonagain.
Even if you have more than one hard drive attached to your computer, you still have to select the drivethat’s currently running your system—the installer will put all of the XAMPP files into your computersApplications folder.
4.
Click the upgrade button and when you’re prompted for you administrator password type it into the password field and click the OK button.
You must have administrative privileges on the computer in order to install XAMPP, or any Webserver or database server.The installer goes through the process of updating your computer, and after a few seconds completesthe installation.
5.
Click the Close button.
Although the software is now loaded on your computer, you still have to start it up. Unfortunately, theXAMPP project hasn’t supplied an easy way to do this yet, so you’ll need to open the Terminalprogram and type some UNIX instructions—don’t worry, it sounds way more scary than it is.
6.
Open the Terminal program (for example, by double-clicking its icon.)
The program is located in the Utilities folder in your computer’s Applications folder.
7.
Type
sudo su
and hit return. Then, when prompted, type your administrator password.
This gives you “superuser” powers to start software on your computer that everyone can use. (It alsogives you the power to really mess things up, so make sure you type everything listed here verycarefully and then quite Terminal as soon as you’re done.)
8.
Type
/Applications/xampp/xamppfiles/mampp start
and hit return.
This starts up all the servers you’ve just installed. Next, you’ll turn off the FTP server, since you won’tneed it for this tutorial.
9.
Type
/Applications/xampp/xamppfiles/mampp stopftp
and hit return.
This turns off the FTP server. And finally, you’ll turn on the latest verion of PHP, PHP 5.
10.
Type
/Applications/xampp/xamppfiles/mampp php5
and hit return.
This turns off the FTP server. And finally, you’ll turn on the latest verion of PHP, PHP 5.
11.
Launch a Web browser like Safari and type
http://localhost/
in the location bar. When the splashscreen appears, click the language you want to use, and you’ll be directed to a page on your newlyinstalled Web server (see Figure PHP Tutorial 1-1.)
To stop the Web Server and MySQL server at any time just follow steps 6 and 7 above, and in the Terminalprogram type
/Applications/xampp/xamppfiles/mampp stop
and hit return. Unfortunately, at this time,there’s no easy way to automatically start XAMPP whenever you turn on your Mac, so you’ll have to
Leave a Comment