Maybe this will help:
Installing an Apache Web Server / PHP on Windows
This tutorial will explain in detail how to install an Apache Web Server on a Windows Operating System. Installing Apache on your personal computer will allow you to turn your computer into a one man website. When you install both Apache and PHP, you will allow yourself to test your PHP scripts on your computer before you upload them to the internet. This can save quite a bit of time you would be spending uploading a new script every time you receive an error.
I would always recommend that you install the latest version of Apache. You can find Apache at it’s home address,
http://www.apache.org. Browse through their list of downloads, and see what you can come up with. You may want to read through the announcements to make sure that the file you are downloading is the most current.
Installing PHP
Before we install Apache, lets make sure we have PHP installed first. Like I did with Apache, I would recommend that you download the most current version of PHP. You can find this in the downloads section of PHP’s home,
http://www.php.net.
Once you have downloaded the program, run the setup file. As with any other program you install, you will have to choose a directory to install PHP in. If I were you, I would choose the default directory. Later in this tutorial, you will have to tell Apache where to run your PHP scripts through. Just make sure you remember what directory you install PHP in!
A menu asking for the name of your SMTP email service. Nine times out of ten, you can just leave that as localhost. Then be sure to supply the email address you would like assigned to your outgoing email.
You will then be taken to one finial menu. Here you will have to choose what type of server you would like PHP to be configured with. Basically, this is going to be the server type you install on your machine. If you plan on following this tutorial, select Apache. You will receive an error message explaining that PHP could not be configured with Apache, and that you are going to have to do it yourself. No worries, we will get to that step now.
Installing Apache
Installing Apache is much easier. It uses the Windows Default Installation Program, and just takes a few clicks of the mouse. Just run the setup program, and follow the directions on the screen.
Once you have installed the server itself, it would be best to install Apache as a service. Basically, you are telling your machine that you would like to run Apache every time Windows Starts Up. Once you install Apache as a service, you will have the option of turning the server on and off through the start menu, however it would be easier to not have to worry about these types of things.
To install Apache as a service, open up the start menu, click on programs, apache web server, apache as a service, and install service. Now be sure to restart your computer. Simple enough huh?
Now that we have installed Apache to all it’s glory, we want to make sure it works. Open your web browser, and point the browser to your IP address. If you do not know what your IP address is, simply click on the start menu, run, and type in the command “winipcfg.” For example, you may have something like
http://192.168.1.100 when you finish. Hopefully you see an HTML document that states in very large words at the top of the page, “Seeing this instead of the website you expected?” Congratulations, you just installed a web server on your computer, however we are not finished.
Configuring Apache to Run PHP
Before you can run your PHP scripts with Apache, you have to configure Apache. It is nothing all that hard. Just a few lines of text you have to add to the bottom of the configuration file.
Click on the start menu, programs, apache web server, management, and edit configuration. Scroll down to the bottom of the page, and type in these exact lines. (However, if you did not install PHP to the c:/php/ directory, you will have to amend this code accordingly.
ScriptAlias /php/ “c:/php/”
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php “/php/php.exe”
In the first line we created a virtual path that will allow Apache to get to the PHP Program itself. Then in the next line we told apache what file extensions we wanted to use. When Apache sees these file extensions, it knows to run the files through the PHP Program (this is what we did in the third, and finial line). And it knows how to find the program because you told in so in the first line.
One Finial Test
Earlier we tested to make sure that we had installed Apache correctly on your machine. How lets make sure we configured Apache correctly.
Create a new file using notepad, or another HTML (or PHP) editor. Then type in the following lines.
<?php
phpinfo();
?>
Save it as test.php
When you save this file, you will want to save it on your server. Click on my computer, local disk (C:), program files, apache group, apache, and htdocs. Generally this can become a pain in the pass, so it would be nice to create a shortcut to the directory, and store the shortcut in a easier place.
Now point your browser at
http://127.0.0.1/test.php (or you can use your IP address in the stead of 127.0.0.1). If a nice pretty page opened up with a bunch of information about Apache and your current version of Apache / PHP, then you have done well.
User Login: Please enter your username and password below. If you have yet to join us, please Register today!