Setting up a PHP/MySQL testing server on your own computer is an invaluable time saver for web developers. Once set up and functioning properly, you can develop, test, and prep your dynamic sites without having to upload to your live server every time you make a change. Mac OS X comes with an Apache server and PHP installed by default, but they lack a great deal of the useful tools you will be using and they require you to be comfortable using Terminal which many new developers can find cumbersome.
This tutorial shows you how to get around using Terminal and easily set up your Mac to run a PHP/MySQL testing environment that you can use for testing PHP pages. If you are a Windows user and want to set up a testing server view the tutorial for Installing XAMPP on Windows.
In most cases, having a local testing server will save you time and make developing your dynamic website easier. However, depending on the extent to which a customer is developing websites, this may not be necessary.
In this case, you should upload the Solution Pack directly to your server after modifying the necessary configuration files.
If you have ever enabled (or attempted to enable) a testing server on your Mac using the default Apache server, you will want to turn that off now to avoid conflicts.
MAMP installs everything you need to run PHP pages and a MySQL database on your local machine.

NOTE:The installation process can take up to a few minutes. After installation is completed you can access the MAMP control panel at any time from within the MAMP folder in your Applications folder.
Once installed, you can use the MAMP Control Panel to start your testing server.
NOTE:When the MAMP Control Panel opens, it will also open a browser window for managing your server settings. Close this window for right now and return to the Control Panel.



With your testing server now installed and running, there are a few final steps you should take to make sure everything is configured to work perfectly.
You should test your PHP Installation to make sure everything is set up for you to load PHP pages on your local computer.
This page displays the login credentials for your MySQL database. The username (SuperUser), 'root' is created for you automatically and is the username you can use for accessing your MySQL database or creating a database connection.

If you see a PHP page similar to this, you have completed setting up your PHP/MySQL testing server.
Now that your testing server is completely set up, you can preview PHP pages on your local computer. The location on your computer to place your files by default is Applications:MAMP:htdocs. You can change this in the Apache tab in the MAMP Control Panel Preferences.

Now, you should define a site in Dreamweaver that references your testing server. For instructions, see the Defining your site for dynamic development tutorial.
If you did not find this helpful or you are stuck on a particular step, click here to let us know what we can do to improve this tutorial.
This form was built using CSS Form Builder.