If you are on this site, we're sure that you already know that PHP is a server side web programming language. Its purpose is very similar to ASP, but in my opinion, it's better. There are more databases available to use with it and ASP can only communicate with Access and SQL servers. PHP can communicate with SQL Server, MySQL, mSQL, and several others, but that is not the topic of this tutorial.
What's Apache?
Apache is a web server, similar to PWS, and IIS. They, and it, listen(s) on a specific port (usually it's 80) and allow you to run a website off of your home computer. Neat, Eh?

Installing Apache

First you need to download Apache Do that here. It's fairly large (about 3.6mb), so be patient. After downloading, double click the exe. Installing is a breeze, but configuring isn't that easy.
Configuring Apache
Move to your apache directory after installing. It's usually C:\Program Files\Apache Group\Apache. Look for, and open, a folder called conf. Open the file called httpd.conf. It may look cryptic and confusing at first, but about half the file is made up of comments, which begin with a "#" mark.

The parts in red need to be found, and the parts in green need to be changed or added. (NOTE: I removed all the file comments for the sake of size - those comments shown below are there just as a guide for you.)

DocumentRoot "C:/website"

#NOTE: you can change c:/website 
#to anything you want, that is just 
#happens to be where I store my files. 
#Another NOTE: All slashes must be forward /
<Directory />
    Options FollowSymLinks ExecCGI
    AllowOverride None
</Directory>

<Directory "C:/website">
    Order allow,deny
    Allow from all
</Directory>

After changing that, place a file (we'll call ours filename.htm) to the document root you set. Then start Apache (by clicking Start button -> Program Files -> Apache -> Management -> Start Apache). Now use your favorite browser, and type in:
http://localhost/filename.htm
You should get your file. Cool. If so, keep reading. If not, then email me and tell me what the problem is. Be sure to send the complete httpd.conf file.
Installing PHP
This part is fairly easy, the PHP homepage is php.net, you can download the PHP 5.2.3 installer here. This file is quite big too. So, again, be patient. Now, unzip the file to C:\php.
Stop Apache, if it isn't already. Copy php4ts.dll to the Windows\System directory. In httpd.conf search for #LoadModule it should bring you to a list of modules that can be loaded. Leave those alone, but directly under them, add these lines:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
Now, write a file called test.php, with this as the content:
<?php
echo "PHP Rules!";
?>
Save the file, and put it into the directory you set as the document root. You set that up above. Now start up Apache, and type this into the location bar of your favorite web browser:
http://localhost/test.php
If all goes well, you should get a lovely:
PHP Rules!
...on the screen. Well, did you? If so, great. If not, email me any problems you have, and I will see if I can help you.
What Next?
Well, that is up to you, I would recommend reading the PHP Manual, and accelerating your PHP skills.
This article originally appeared on HTMLGoodies.com.