To build a web site with PHP, you need a web server. Apache is the most popular web server in the world. It's free, powerful, stable, and secure. What more could you ask for? You probably want a database program to use with your web site. One of the most common choices for a database program to go along with PHP is MySQL. This section shows you how to install Apache and MySQL on your computer.
The instructions in this section are only for people who are installing PHP on their own computers. If you are using a web-hosting provider's PHP setup, then don't install Apache and MySQL yourself. Your hosting provider has taken care of that for you.
How you install Apache depends on what operating system you're using. Follow the appropriate instructions for your platform.
Take the following steps to install Apache on Windows:
Go to http://httpd.apache.org/download.cgi and download the most recent version of the "Win32 Binary (MSI Installer)" for Apache 2. This is in a section of the page titled something like "Apache 2.0.49 is the best available version," and has a filename such as apache_2.0.49-win32-x86-no_ssl.msi. (As new versions of Apache are released, the 2.0.49 becomes 2.0.50 or 2.1.0 and so on.)
After the Installer downloads, double-click on it to run it. You should see a window like the one in Figure A-15. Click the Next button to begin the installation procedure.
Figure A-15. Beginning the Windows Apache installation ...