Alright, you first need to download Apache_2.0.59-win32-x86-no_ssl.msi from
Apache Downloads (this is a self installer). You will also need PHP-5.2.1-Win32.zip from the
PHP download page. Once you have those two files downloaded, first install apache by double clicking on the self installer. Just follow the instructions as you go through it. If you are just wanting this on your machine to be able to test your code then type in localhost when it ask for the web address and name.
After that is complete, unzip the php zip file into a folder (I would suggest c:/php/). After unzipping the folder you will find a file called 'php.ini-dist'. Take and copy this file into your windows folder, it should be located at c:/windows/, then rename the file taking the '-dist' off of it leaving 'php.ini'.
Open the file in note pad and make the following changes. Look for the LoadModule area and add the following line:
Save and close the file (making sure that it is saved as php.ini in the windows folder).
Then open up, in notepad, the file called httpd.conf (the config file for apache). There are actually a couple of ways to do this. You can browse to it inside the windows explorer, or under the start menu there is an easier way of getting to it. Click Start / All Programs / Apache HTTP Server 2.0.59 / Configure Apache Server / Edit the httpd.conf. Once the file opens you need to change a few things. First:
That way when you connect to the server it looks for a index.php file first then the .html
Second add this to the end of the LoadModule area:
Next, add the following line to the end of the document on a new line:
Then look for DocumentRoot and change to the following:
Make sure that the folder exists on your hard drive. Then you can save all your files to this location and find them easier instead of having to navigate through the file tree of the apache server.
Lastly look for <Directory blahblahblah> and change to match the document root:
Then restart your server and
you should be all set to go. To test it out put the following code into a text file and save it as index.php in your servers document root directory (
www/).
Open your browser and type localhost into the address bar. Ta-Da. Done.
Hope that helps
**EDIT**
I had to change a few things, as all the changes need to be done in the apache config file. Nothing needs to be changed in the php.ini file unless you were want to add full mail support or turn on global variables (which I suggest you do not do).
Tony
[ February 11, 2007: Message edited by: Tony VanHorn ]
[ February 20, 2007: Message edited by: Tony VanHorn ]