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.
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?
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.
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.)
#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 /
Options FollowSymLinks ExecCGI
Allow from all
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:
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.
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
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: