Windows Installation
The setup files included on the CD-ROM are suitable for Windows 95, 98, NT, 2000, XP, or 2003. Earlier versions of Windows are not supported.Insert the CD-ROM into your PC and it should autoplay. If the menu screen shown in Figure A.3 does not appear, double-click the drive icon for your CD-ROM under My Computer.
Figure A.3. The CD-ROM installation menu.

Installing MySQL
Click the button in the menu to begin installation of MySQL 4.0.15. At the screen shown in Figure A.4 click Next to continue.
Figure A.4. Beginning a MySQL installation.

Click Next again after you have seen the release notes and the next screen allows you to choose the destination location for the MySQL files. If you change from the default of C:\mysql be aware that the path used in subsequent steps will also need to be changed.The next step is to choose the setup typetypical, compact, or customas shown in Figure A.5. A typical installation will do the job here, so leave the default item selected and click Next to begin the installation.
Figure A.5. MySQL installation type selection.

Once the installation program has finished, open up the file explorer to C:\mysql\bin (if you changed the installation location above, this will be relative to the folder you selected) and run winmysqladmin.exe. The first time this program is run you will be asked to enter a username and password.Having done this, the traffic light icon in your system tray indicates the status of the MySQL serverit should be green. Click the traffic light and select Show Me to bring up WinMySQLadmin, which shows the connection information for your server as seen in Figure A.6.
Figure A.6. WinMySQLadmin shows the status of your MySQL server.

Installing Apache
Click the button in the menu to begin installation of Apache 2.0.47. At the screen shown in Figure A.7 click Next to continue.
Figure A.7. Beginning Apache installation.

You must accept the license terms on the next screen to continue with the installation, after which you will be shown some release notes. Click Next once you have read these and you will be asked to enter your server information, as seen in Figure A.8.
Figure A.8. Entering your Apache server details.

Enter your server's domain and hostname and your email address. If you are installing on a personal workstation, use localhost and localdomain for your server information. Leave the radio button selected on the recommended option to install Apache on port 80.The next screen asks you to choose a setup type, either typical or custom. The typical setup is just fine, so leave the radio button selected on that option and click next to continue.Then you are given the opportunity to select the destination folder for the Apache files. By default this is C:\Program Files\Apache Group and this location shouldn't cause you any problems. If you wish to change it, hit the Change button before pressing Next.Finally Apache is ready to install. Pressing Install will start copying and setting up files onto your system.Once installation is complete, the Apache server and monitor program will start up and you will see a new icon in your system tray. Double-click this icon to bring up the Service Monitor, which will look like Figure A.9.
Figure A.9. The Apache Service Monitor.

The green light next to Apache2 shows that the service is running and you can verify this by opening up a Web browser and visiting http://localhost/. The default Apache page will be displayed, as shown in Figure A.10.
Figure A.10. The default Apache page on a Windows system.

You can stop or restart the Web server from the Apache Service Monitor using the buttons on the right hand side. Make sure Apache is not running before continuing to install PHP.
Installing PHP
Click the option on the CD-ROM menu to install PHP 4.3.3 and a self-extracting zip archive will open, as shown in Figure A.11.
Figure A.11. Beginning installation of PHP.

The default location to extract to is C:\and a new folder called php-4.3.3-Win32 will be created, so you do not need to change the location. Click Extract and the files will be extracted to your system. Close this window when it has finished.The installation process for PHP still requires manual intervention to add the PHP module to Apache. Using the file explorer, open up the Apache configuration directoryif you used the default location it will be C:\Program Files\Apache Group\Apache2\confand edit httpd.conf.Look for a section that contains a number of LoadModule directives, some of which will be prefixed with a # sign. The last few lines of this section will look like this.
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
Add the following line to the LoadModule section to tell Apache to load the PHP module on startup.
LoadModule php4_module c:/php-4.3.3-Win32/sapi/php4apache2.dll
Next search for the AddType section with directives that look like this
AddType application/x-tar .tgz
AddType image/x-icon .ico
Add the following line to tell Apache to process any file ending with .php as a PHP script, as well as .phtml and l files. You can add more file extensions to this line separated by spaces if you wish.
AddType application/x-httpd-php .php .phtml l
We also need to copy php.ini and a DLL file to a system location. Under C:\php-4.3.3-Win32 you will find php.ini-dist and php4ts.dll. Move php.ini-dist to your Windows directoryusually C:\WINDOWS or C:\WINNTand rename it as php.ini, and move php4ts.dll to where your DLLs are storedusually C:\WINDOWS\SYSTEM or C:\WINNT\SYSTEM32.To make sure these changes take effect, restart Apache from the Apache Service Monitor. The light next to the Apache2 service should change from red to green indicating that Apache has started.If you encounter problems starting Apache, check the system events log from Control Panel then Administrative Tools to find the error message.Now we're ready to check that PHP is working. In the htdocs directory in your Apache installation, create a file called index.php containing the following lines.
<?php
phpinfo();
?>
In your Web browser, visit http://localhost/index.php and make sure the PHP information page appears, as in Figure A.12.
Figure A.12. The phpinfo() page on a Windows system.
