How to install and configure Apache,PHP,MySql and phpMyadmin on windows

You may also like...

68 Responses

  1. Rahul says:

    I have done every step as you told..
    After Installing I got “It works” and PHP info file..
    But when I interact with Mysql with PHP, the page takes a lot time to load then displays a blank page and I can’t even login to phpmyadmin.
    PHP alone works fine but problem is with PHP connecting mysql..

    I have disabled firewall and closed all applications still no answer..
    Please help me here

  2. Roger Ruz says:

    Thanks for this tutorial it helped me a lot. But I have one problem left. After installing all of the software on my computer, and wordpress, I can’t run the wordpress. It says “Error establishing a database connection”. I don’t know, if what’s causing the problem, I carefully follow your guide but I end up getting this message.

    Please help!

    • Manikandan says:

      This means WordPress is unable to establish a database connection.


      1.your database login credentials are wrong
      2.your database server is unresponsive
      3.database has been corrupted

  3. Kristian says:

    Hello. I have installed Apache, MySQL and PHP on Win8. “It works” and phpinfo are both successful but when I try to open “” I get the following error message:

    The website encountered an error while retrieving http://localhost/phpmyadmin/. It may be down for maintenance or configured incorrectly.
    Error code: 500

    Any suggestions?

  4. John says:

    Great tutorial. However after i follow the directions for the last step and i type in the renamed address I get a 500 error on the browser and the errorlog in apache says
    “[error] [client] File does not exist: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/favicon.ico” Im having difficulty figuring out how to fix this. Any ideas?

  5. Roy says:

    I tried to connect to phpmyadmin. I extracted the folder into the htdocs folder. However, when I type localhost/phpmyadmin I get a list of files in bulletin points (parent directory, changelog, license, readme, etc). I am not able to get the window in which you typr your username and password.

  6. ALIREZA says:

    thanks for this tutorial . It helps me a lot :)

  7. Dradams says:

    when i tape http://localhost/phpmyadmin/ i see nothings

    • Manikandan says:

      Extract the zip archive to this location

      C:\Program Files\Apache Software Foundation\Apache2.2\htdocs

      And rename the phpMyAdmin-x.x.x-all-languages folder to phpmyadmin
      Here x.x.x is version number.

  8. kashif khan says:

    When I type in the address “http://localhost/phpinfo.php” in the browser I can see the contents i.e …..

    I have understanf that php funstion is not ablt to call?? how can I resolve the issue??

    Thanks and Regards,
    Kashif Khna

  9. Nicolás says:

    Thank you very much…

    It has the precise steps to install a WAMP.

  10. gong says:

    thanks, for detail tutorial

  11. RaviKanth says:

    Thanks for the details provided. Really excellent…………

  12. Prannoy says:

    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?

  13. Bongz says:

    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”

  14. Alfred D'Souza says:

    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

    • Manikandan says:

      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)

    • fegyi001 says:

      I think the problem is that you did not restarted Apache before that.

  15. dado says:

    dude thanks :)) you are great :*

  16. Heartbeat says:

    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

  17. Kelvin D souza says:

    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

  18. Kungz says:

    Nice tutorial, really help a lot and solve the problem. Thank you very much

  19. Dave says:

    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

  20. Danman says:

    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.

  21. T Khong says:

    Thank you very much. I am looking for this!!!

  22. dhiraj says:

    thanks…. its really good website.

  23. Dennis says:

    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…

  24. kaiyum says:

    All installation is completed successfully, THANKS so much :)
    BUT .htaccess is not running. What will be the causes…………..

  25. Nitramkamunyu says:

    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.

    • connectwww says:

      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

  26. Albanziu says:

    when I type localhost/phpmyadmin its show


  27. safa says:

    while testing php it show error 404..what do i do??

    • connectwww says:

      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

  28. Ali 24x7 says:

    I have been trying to get these working for the past 4 days continuously, but didn’t get success. 

  29. m3trella97 says:

    I’m getting this error message from phpmyadmin.

    The mysqli extension is missing.

    any ideas?

    • admin says:

      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

  30. Piyush says:

    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.

  31. Kelly says:

    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?

  32. Kelly says:

    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!

  33. firman says:

    thx for your great website, it’s help’s a lot.

  34. harsh says:

    wen ever i try to restart apache i get a error message “the requested operation has failed..”..weat is d solution for d same..??

  35. Shreyas says:

    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?

  36. Abee says:

    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!!!!!!

  37. floydro says:

    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!!!!

  38. yassine says:

    Thanks for your help you saved me some precious time fixing a config error with phpmyadmin

  39. cristian says:

    Yeah! It was iis on port 80,I have simply modified the httpd.conf file and “It works!” 😀 Thanks!

  40. Cristian says:

    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
    no listening sockets available, shutting down
    Unable to open logs
    Note the errors or messages above, and press the key to exit.”
    (Google translate :D)
    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!

  41. Edric says:

    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 :D. Thanks!

  42. OJ says:

    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.

    • admin says:

      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.

      PHPIniDir “C:/Program Files/PHP/”
      LoadModule php5_module “C:/Program Files/PHP/php5apache2_2.dll”
      AddType application/x-httpd-php .php

  43. ZC says:

    THANK YOUUUU!!!!!! this tutorial is very informative and helped me out a lot!!!!!!!!!

  44. Sajesh Mohan says:

    Thank you very much This page helped me a lot to start with PHP

  45. check says:

    Thanks! I finally understood it thoroughly..

  46. Raja Sekhar says:

    Thank you very much

    This page helped me a lot to start with PHP

    – Sekhar

  47. Jimmy Wendelken says:

    It is a wonderful post. I will absolutely be reading this blog more.

  1. February 19, 2011

    […] On Windows Click Here: How to install and configure Apache,PHP,MySql and phpMyadmin on windows […]

  2. October 15, 2011

    […] On Windows Click Here: How to install and configure Apache,PHP,MySql and phpMyadmin on windows […]

Leave a Reply

Your email address will not be published. Required fields are marked *