Step by Step Guide to install Apache server, PHP, MySQL

step1
Install an Apache server
 
Download from here:
Download Win32 Binary (MSI Installer) version for windows platform.After download start the installation process.
 
you will find the installation process as shown below.
 
 
 
 
Now you will be asked server information.You can enter localhost for both the Network Domain and Server Name. As for the administrator's email address you can enter anything you want.
 
 
Click the Next  and choose Typical installation
 
 
Now you will be asked ,destination folder. Click Next
 
 
Now click on Install
 
 
Click finish to complete installation.
 
 
Now you have successfully installed apache.To check if your Apache installation was successful open up you browser and type http://localhost in the address bar. You should see something like this .
 
 
Now go to C:\Program Files\Apache Software Foundation\Apache2.2\conf and open httpd. It sud open in notepad. now find these lines.
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
 
change it to
DocumentRoot "C:/www"
 
Make a folder in c:/ and name it as www
After making changes to the configuration file you have to restart Apache
Start > Programs > Apache HTTP Server 2.0.50 > Control Apache Server > Restart
 
Now c:/www is the document root where you must put all your PHP or HTML files so it will be process by Apache ( and can be seen through a web browser ).
 
 
Now change directory index. This is the file that Apache will show when you request a directory. As an example if you type http://www.techhunt.org without specifying any file the index.php file will be automatically shown.
 
 
Suppose you want apache to use index.html, index.php or main.php as the directory index you can modify the DirectoryIndex value like this :
 
DirectoryIndex index.html index.php main.php
 
 
Find this line in httph file
DirectoryIndex index.html
 
and replace it by
DirectoryIndex index.html index.php main.php
 
 
Now whenever you request a directory such as http://localhost/ Apache will try to find the index.html file or if it's not found Apache will use index.php. In case index.php is also not found then main.php will be used.
 
 
Step 2
Install PHP
 
Download PHP 5.2.3 installer [21,966Kb] from here:
 
After downloading the setup..start the setup.
 
 
Click Next
 
 
 
Here you will be asked destination folder.Put C:\Program Files\PHP\ as destination folder...and click Next
 
 
Now you are at web server setup.Select Apache 2.2.X Module and click Next
 
 
Now you are at select apache confrigation dictionary.Here select this path
C:\Program Files\Apache Software Foundation\Apache2.2\conf\
and click Next
 
Now you can see "choose items to install"
 
 
Expand Extensions...and select MYSQL to install as shown below.
 
 
Click Next
 
 
Click Install
 
 
Your PHP 5.2 is installed.
 
Open a notepad ..and type following:
 
<?php phpinfo(); ?>
 
and save it as phpinfo.php in c:/www folder
 
Restart your computer.
 
After re-starting the computer..open IE and type following url
http://localhost/phpinfo.php
 
you should see page like this:
 
 
If you can see this page..congratulation you have sucessfully installed PHP 5.2 and apche 2.2.x
 
 
Now Install MySQL
 
Download from here:
 
 
Follow simple instruction, and complete the installation.
 

We are using a very affordable web hosting provider for this website.