Step 1:
Installing apache
Download the best available version of Apache web server for Windows from this Download link
Select
Win32 Binary without crypto (no mod_ssl) (MSI Installer)
or
Win32 Binary including OpenSSL
Here we using Apache HTTP Server (httpd) 2.2.17 Win32 Binary including OpenSSL
Double click the installer->Click next->check i accept the terms in the licence agreement and click next->Next->
Now see the below image to fill the server information

Then Click Next->Next->Next->Install->Finish.
If you are finished , open your favorite browser and type
http://localhost/
in the address bar and press enter.
If you will see ‘It works!’ , then your apache works fine.

Step 2:
Installing PHP
Download the latest php version from this Download link
Select VC6 x86 Thread Safe Installer
Here we using php-5.3.3-Win32-VC6-x86
Double click the installer->Click next->check i accept the terms in the licence agreement and click next->Next->
Now see the below image to select the webserver (Apache 2.2.x Module)
Then Click Next->
Select your apache configuration directory.see the below image for the path
The advantage of using the .msi installer is that it will edit and add to the Apache config file for us. In the default Apache 2.2 installation, this will be found at C:\Program Files\Apache Software Foundation\Apache2.2\conf\.
press ok Next-> Next->Install
Click finish to finish the installation.
Restart your apache server,if your are getting any error just restart your pc.
Test PHP installation
To test PHP is installed, Open a simple text editor (like Notepad) and copy/paste below code into it;
<?php phpinfo() ?>
Save as this file phpinfo.php in your Apache Document Root Folder (your home directory)
ie:
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
Now open your favorite browser and type
http://localhost/phpinfo.php
in the address bar and press enter.
If you will see the below page , then your php works fine.
If you are getting below error msg during installation
Click ok and then finish.
Open your httpd.conf file in notepad.the default path is
C:\Program Files\Apache Software Foundation\Apache2.2\conf
And add the following lines to the end of the httpd.conf file:
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir "C:/Program Files/PHP/" LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll" AddType application/x-httpd-php .php #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
Save the file and Restart your apache server, if your are getting any error just restart your pc. And Test you PHP installation.
Step 3:
Installing MySql
Download the latest MySql version from this Download link
Click MySQL Community Server and select Windows (x86, 32-bit), MSI Installer to download.
Here we using MySQL Community Server 5.1.51
Double click the installer->Click next->next->Install->Next->Next->
Next->Next->Next->Next->Next->Next->Next->Next->Next->Next->
If this is your first MySql Database setup, you simply enter your root password.
Click next->Execute->Finish.
Testing MySQL
Open your MySql command line client
To open MySql command line client Go to Start->All programs-> MySql-> MySql server 5.1-> MySql command line client
Type your password and you will get like this
Step 4:
Installing phpMyadmin
phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.
Download the latest phpMyadmin Zip version from this Download link
Here we using phpMyAdmin 3.3.8
Extract the zip archive to this location
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
And rename the phpMyAdmin-3.3.8-all-languages folder to phpmyadmin. Here 3.3.8 is version number.
Now open your apache httpd.conf file and find these lines
<IfModule dir_module> DirectoryIndex index.html </IfModule>
Add index.php after the index.html and it looks like this
<IfModule dir_module> DirectoryIndex index.html index.php </IfModule>
Restart your apache server.Open your browser and type
http://localhost/phpmyadmin/
in the address bar and press enter.
Type username and password to login.











It is a wonderful post. I will absolutely be reading this blog more.
Thank you very much
This page helped me a lot to start with PHP
- Sekhar
Thanks! I finally understood it thoroughly..
Thank you very much This page helped me a lot to start with PHP
[...] On Windows Click Here: How to install and configure Apache,PHP,MySql and phpMyadmin on windows [...]
THANK YOUUUU!!!!!! this tutorial is very informative and helped me out a lot!!!!!!!!!
Hi,
Your instructions are very lucid and they helped me a lot.
Although, I am still having problems with testing my PHP Installation.
I’ve tried both the solutions you gave, with the second one; it’s unable to load that page and with the first one; it gave me an error saying : Error 404..not found
Your help is highly appreciated.
1.Save the phpinfo.php in your Apache Document Root Folder (your home directory) ie: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
2.And add the following lines to the end of the httpd.conf file: and restart ur pc ,then test.
#BEGIN PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALL
PHPIniDir “C:/Program Files/PHP/”
LoadModule php5_module “C:/Program Files/PHP/php5apache2_2.dll”
AddType application/x-httpd-php .php
#END PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALL
Thank You So much For this tutorial! This tutorial help me a lot. I think this is the easiest one tutorial that i’ve tried
. Thanks!
1) installing apache as service (recommended) it gave me an error saying:
)
“(OS 10013) attempt to access the socket in a manner not permitted by their access permissions: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Note the errors or messages above, and press the key to exit.”
(Google translate
but the installation has finished anyway.
2)if I want to install only for the current user,how can I start the service manually?
3)installing in localhost isn’t a local installation? I mean,if I want to use it in web site,it is fully functional?
4)can cause problems installing apache in other drives? (I use two partitions,one for windows application and the other for all my stuff,such as my programs)
P.S. I’m using windows 7 x64 and I recently activated few windows program functions such as IIS…
…anyway,it’s a good work what you’ve posted!
terminate Skype and TeamViewer and iis or anyother on that port
Yeah! It was iis on port 80,I have simply modified the httpd.conf file and “It works!”
Thanks!
[...] On Windows Click Here: How to install and configure Apache,PHP,MySql and phpMyadmin on windows [...]
Thanks for your help you saved me some precious time fixing a config error with phpmyadmin
Great tutorial… Had made a few attempts to install apache+php+mysql on windows 7 and i was about to give up. This was my last attempt and it worked flawlessly.
Thousand thanks!!!!
You are a life saver, I spent 10 hours trying to figure out what you helped me do in a matter of minutes! Thank you so much!!!!!!
I have installed the server, and it also displays “it works”…
But I try to open the http://localhost/phpinfo.php , it gives 404 Not Found?
I tried editing the code in the httpd file, but while re-installing the server, it displays Error(S), in line 4**, something…something…
And I am firm that the errors are due to adding of the addition codes you provided…because it is specifing the SYNTAX ERROR.
So what should I do next?
http://pcsupport.about.com/od/findbyerrormessage/a/404error.htm
wen ever i try to restart apache i get a error message “the requested operation has failed..”..weat is d solution for d same..??
try to terminate Skype and TeamViewer and iis or anyother on port 80
thx for your great website, it’s help’s a lot.
I’ve been trying to get these working for the past 2 days without luck. I used these instructions and they worked like a charm! I think my problem was that I was trying to use VC9 PHP with VC6 Apache. Thank you!
I forgot to mention that my only problem is that it’s not letting me log in – when I use my current Intranet host name or the server name, it says I’m not allowed to connect to this MySQL server. If I just use localhost it says access denied (using the correct password which is 12 characters long (numbers/letters/spec chars). Ideas?
Excellent Stuff. One line should be added after Apache and PHP installation that if due to any reasons (eg. due to info from other website etc.) if the insllation is not correct then the installed product should be uninstalled and start a fresh using this page.
Otherwise it is excellent.
I’m getting this error message from phpmyadmin.
The mysqli extension is missing.
any ideas?
try
1.restart apache server and then pc
or try
2.check php.ini for the mysqli extension entry and Uncomment it (if commented), and restart apache
I have been trying to get these working for the past 4 days continuously, but didn’t get success.
THANKS TO THIS EXCELLENT WEBSITE, THAT HELPS ME A LOT AND INSTALL ALL APPLICATION WITHOUT ANY ERROR WITH SIMPLE STEPS. THANKS A LOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
while testing php it show error 404..what do i do??
1.check the url
2.Save as this file phpinfo.php in your Apache Document Root Folder (your home directory)
C:Program FilesApache Software FoundationApache2.2htdocs
when I type localhost/phpmyadmin its show
Etc…
Hey…
After installing Apache and testing it; it works!
After installing php-5.3.13-Win32-VC9-x86
And creating phpinfo.php in my htdocs
Not Found
The requested URL /Program Files (x86)/PHP/php-cgi.exe/phpinfo.php was not found on this server.
1.check the url
2.Save as this file phpinfo.php in your Apache Document Root Folder (your home directory)
C:Program FilesApache Software FoundationApache2.2htdocs
All installation is completed successfully, THANKS so much
BUT .htaccess is not running. What will be the causes…………..
just open notepad save as .htaccess to create .htaccess file
thanx, but still not working…..
i mean in my web browser parent directory still open, how to block or make it access denied.
Do i have to change any code on httpd.conf or php.ini?
Check below link to disable directory browsing
http://connectwww.com/disable-directory-browsing-using-htaccess-to-increase-your-website-security/418/
Thank you very much, this is very helpful.
This is my first time to configure php, in this site did, It configured in my owned.
Thanks a lot…
thanks…. its really good website.
Thank you very much. I am looking for this!!!
Thank you, Thank you, Thank you and Thank you again. If you a lady I would ******* I am so thankful. Been Googling how to properly install PHP like three days non-stop. An geez there are may sites an geeks claiming their way is the best. Out of bout 50 websites an ways of advising how to install PHP…This site is the real thing. “Plain n simple” an simply THE BEST. Thank you again, much appreciated to have someone that keeps it simple straight to the point an NO DEGREE required to get PHP installed. Thanks again n God bless.
everything went great until i had to add index.php to the httpd file. It said accesss denied amd wouldnt let me save it. ( i am the administrator) so i saved the altered httpd file to the desktop, deleted the one in conf and then replaced it with one onthe desktop. Now I cant restart apache at all
Had to change my permissions in folder properties. All good now. Great Tutorial
Nice tutorial, really help a lot and solve the problem. Thank you very much
Thanks for the post.
Also I want some details on Mysql and Visual Basic 6.0
Is it possible to fetch data data from mysql tables and display it or process it in VB
Sir,
Actually every thing will work fine, except windows 7.
what changes will do to install it in windows 7.
I had followed your instruction but at-last they says that
unable to change the data present at httpd.inf.
so pls give a solution
dude thanks
) you are great :*
Hello,
When I type in the address “http://localhost/phpinfo.php” in the browser I can see the contents of the the PHP page that is “” and not the table as you have shown. Any ideas what I would be doing wrong.
Thanks and Regards,
Alfred D’Souza
Open a simple text editor (like Notepad) and copy/paste below code into it;
< ?php phpinfo() ?>Save as this file phpinfo.php in your Apache Document Root Folder (your home directory)
I think the problem is that you did not restarted Apache before that.
How do I install these on Windows 7?
Please help, I followed all instructions here and when I tested Apache it works and when I test PHP it doesnt work. I get the error ”The webpage cannot be found”
1.check the url
2.Save as this file phpinfo.php in your Apache Document Root Folder (your home directory)
http://pcsupport.about.com/od/findbyerrormessage/a/404error.htm
thanks for the great tutorial/ Everything is fine but i am not able to login in phpmyadmin through the browser. Can you help me with it?
Thanks for the details provided. Really excellent…………
thanks, for detail tutorial
Thank you very much…
It has the precise steps to install a WAMP.