By Kevin Naia
___________________________________
What Is Apache?
Apache is an HTTP Web Server used widely across the internet. It does the same thing IIS (Internet Information Server) does.
What Is PHP?
Well, if you don't already know, PHP stands for PHP: Hypertext Processor. PHP is a widely-used, general-purpose scripting language that is especially suited for Web Development and can be embedded into HTML.
What Is MySQL?
MySQL is a dual-licensed, backend database used for storing data for things such as forums, user logins, shopping carts, etc.
Pre-Setup
- Download the Apache HTTP Server from http://httpd.apache.org/download.cgi - get the newest 1.x.xx version available
- Download the newest PHP version from http://www.php.net/downloads.php - get the newest 4.x.x version available (the zip file under the Windows Binaries Section)
- Download the MySQL Database Software For Win32 from http://dev.mysql.com/downloads/mysql/4.0.html - get the newest 4.x.xx version available
Setup
First, unzip PHP into a directory (c:php) is recommended. Then install MySQL. It is pretty easy, much like setting up another program.
Note: I strongly recommend you put PHP, MySQL, and Apache on the same drive!
When you install apache, you will come to a screen that asks you for domain:

If you want your directory to be viewable by anyone who knows your IP, go to www.whatismyip.com and find out your IP. (Will not work if you have a dynamic IP. Sometimes Cable and DSL will work for a few months before you have to edit it again). Itcan be accessed by going to http://your.ip.address.numbers/. Otherwise just use localhost and it can be access from your browser by http://localhost/ or http://127.0.0.1/
After apache is setup, it's time to start installing PHP. Open up the directory where you unzipped PHP to. Copy php4ts.dll and php4apache.dll (in the c:phpsapi directory) to the directory apache is located in (c:program filesapache groupapache). Paste it in there. Now paste it in your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and %SYSTEMROOT% directories.
Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
Note: What is %SYSTEMROOT% ? Depending on your Windows installation this may be for example c:winnt or C:windows
Finally we open up httpd.conf (c:program filesapache groupapacheconf) and fine the following lines:
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule status_module modules/mod_status.so
...
LoadModule unique_id_module modules/mod_unique_id.so
After the last line, add:
LoadModule php4_module c:/php/sapi/php4apache.dll
Now a few lines below you should see:
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
...
AddModule mod_setenvif.c
After the last line, add:
AddModule mod_php4.c
Now go down in the httpd.conf quite a bit and find the following line:
#AddType application/x-compress .Z
#AddType application/x-gzip .gz .tgz
After the last line, add:
AddType application/x-httpd-php .php
Now open up the apache directory (c:program filesapache groupapache) and rename the htdocs folder to htdocs-old. Make a new folder called htdocs.
Now save that file, go to Start->Program Files->Apache HTTP Serevr->Control Apache Server->Restart. Let it restart, go into notepad and insert the following php code:
phpinfo();
Save that in your htdocs directory (c:program filesapache groupapachehtdocs) as phpinfo.php. Open up your browser and go to your web server's root directory with one of the methods stated earlier. Click on phpinfo.php and see what happens. If you somehow installed PHP incorrectly, you may get an Apache-generated error, an error similar to "Cannot load module mod_php4.so" (or something similar), or just the plain unexecuted PHP source code. If you messed up somewhere you should backtrack or start over. If you still have no luck, post a reply here with a description of the problem and a screenshot if possible/necessary and I will do what I can to help.
View Comments (0)