Real-World Windows 2000 Configuration: Getting Apache, PHP, MySQL, and phpMyAdmin to Work Together, Part 1
Are you interested in installing the Apache Web server, the PHP server-side scripting language, and the MySQL database on a computer running a Windows 2000 operating system? Perhaps you would like to install the software on a Windows 2000 laptop in order to develop, demonstrate, or learn how to program a database-driven Web site. All of this high-quality software (excluding Windows) is free (there may be a charge for the database software, depending on how it is used). Conveniently, the versions of these programs that are meant to be run on Windows are available as pre-built binaries.This two-part tutorial covers nearly every detail of one writer's quest to install and configure a Web server, server-side scripting language, database, and data administration application on Windows 2000. Part 1 focuses on how to get Apache 1.3.26 with Mod_SSL 2.8.10 and PHP 4.2.2 up and running.
This article explains how I installed and configured Apache 1.3.26 with Mod_SSL 2.8.10, PHP 4.2.2, MySQL 4.0.2-alpha, and phpMyAdmin 2.3.0-rc4 on my Dell Latitude C800 laptop running Windows 2000 Professional. I used Apache 1.3.26, which is the old stable release, rather than 2.0.39, the current stable release, for at least three reasons (at this time):
- PHP only has experimental support for Apache 2.0.
- I haven't found a Windows build of Apache 2.0 with
- It appears that none of the Zend products are compatible with it.
If you are looking for Apache 2.0.39 installation information on Windows more information can be found in our sidebar article, "Using Apache 2.0.39." If you are thinking of installing Apache on Windows XP, please note the warning on the Apache Win32 binaries page.
Because Apache 1.3 isn't as stable on Windows as it is on other operating systems, you will not find many production Apache sites running on Windows. Also, although Apache 2.0 is designed to be more stable on Windows (and other systems) than Apache 1.3, I believe that until the combination of Apache 2.0 and PHP4 stabilizes you will not find many production sites running them on any operating system.
The article started out as the notes I compiled as I installed earlier versions of this software. It is a guide to one way to put the pieces of the puzzle together. As such, it can save developers a lot of time.
It is my intention that this article help others that are starting out, while also being useful to experienced developers. For developers coming from a Windows background (and there's potentially man of them out there), this article can be a smoother bridge to learning how to install, configure, and use this open source software. A lot of the information in this article is operating system independent. The article is more detailed than a typical introductory article, but it is pitched to multiple levels of expertise, and as the subjects are all interrelated, it is handy to have them collected in one article.
Please note that this tutorial is oriented toward configuring a stand-alone system, e.g., when the top-level URL is
http://127.0.0.1/. For a networked environment, the modifications you'll need to make include changing the host name or IP number in the configuration files and scripts, and the site's SSL authentication certificate, if used.
My first piece of advice is to read the instructions. All of the pieces of software that will be mentioned include good documentation. I will tell you where to get the software and documentation, and which pieces you need for a basic setup. I will also go into additional detail in areas that I think might be of interest, with a significant amount of attention given to security concerns.
My second piece of advice is to keep abreast of security vulnerabilities. For example, while I was writing this article, PHP 4.2.2 came out as a result of a security vulnerability that was discovered in versions 4.2.0 and 4.2.1.
This article is primarily oriented to setting up a new system. If you have previously installed (or attempted to install) the software referred to in this article, and you want to start over with the approach that I will be describing, I recommend first backing up content, scripts, and other data that has previously been developed. Then, consider removing the old Web server, scripting, and database software.