The Easiest Guide To Apache 2.2, PHP 5.3 and MySQL 5.1 Server Installation On Windows 7

May 23, 2012 – 11:00 pm

Yeah, you read the title right. I am going to show you step by step, screenshots-laden guide to install Apache 2.2, PHP 5.3 and MySQL 5.1 on Windows 7. This is probably one of the easiest guides to follow, although it will take a bit of your time. Some may argue that you can always use XAMMP or WAMP , but installing these components piece by piece has its own satisfaction (and makes you a smarter person).




You need to download these components first, and I suggest you download the exact version such as mine (remember that you want the EASIEST guide, right?)

1- Apache Web Server version 2.2.22 (httpd-2.2.22-win32-x86-openssl-0.9.8t.msi)

2- PHP version 5.3.12 (php-5.3.12-Win32-VC9-x86.msi)

3- MySQL 5.1.62 (mysql-essential-5.1.62-win32.msi)


And to make the installation hassle-free,

4- Setup your firewall to allow access to port 80 and port 3306. If you don’t know how to do this, disable your firewall temporarily.


Phase 1 – Server Network Setup on Windows 7

If you want to use as your web server address, you can skip to step 5. Choosing will not allow other people from the same LAN to connect to your server.

Pick an imaginary Fully Qualified Domain Name (FQDN) for your server, in my case:


1- Make sure your computer is physically connected to the network.


2- Check your computer IP address. Write down your IP address, for example:


3- Run and open Notepad as Administrator.

run notepad as admin


4- Using Notepad, open the hosts file located in C:\Windows\System32\drivers\etc\hosts



5- Insert a new line your server’s IP address followed by your web server’s FQDN. Save the hosts file.



6- Open the Windows command prompt. Make sure you can ping your server using the IP address AND the domain name.




Phase 2 – Apache Web Server 2.2.2 Installation

1- Run the Apache Web Server installer.


2- Click Next on the Welcome screen.



3- Accept the terms in the License Agreement. Proceed with Next.



4- Read the details if you want to and click Next.



5- Make sure the settings in the Server Information screen is the same as you have configured in Phase 1 (check out the example below). Click Next to proceed.



6- Select Typical for Setup Type. Next.



7- Accept the default Destination Folder. If you change this setting, make sure you remember the folder. Next please.



8- Press Install to start the Apache installation! Wait a few seconds and press Finish.




9- On your system tray, right click the Apache tray icon to open the Apache Server Monitor console. If the Service Status icon is green, you are doing just fine.



10- Open your favorite web browser. Type in your server’s FQDN. The “It works!” screen shows that Apache web server 2.2.22 is running successfully.




Phase 3 – PHP 5.3.12 Installation

1- Run the PHP installer. Press “Next” to proceed with PHP installation.



2- Accept the “License Agreement”.



3- Change the PHP installation directory to C:\PHP .



4- Select “Apache 2.2.x Module”.



5- Browse and select your Apache 2.2.22 configuration directory as shown below.



6- Accept the default configuration on the “Choose Items to Install” screen. Move on with Next.



7- Click “Install” to complete the PHP installation.



8- Press “Finish”.



9- Using the Apache Server Monitor on the System Tray, restart your Apache server.



10- You should see the changes on the Apache Server Monitor status bar, showing the success integration of Apache 2.2.22 and PHP/5.3.12.



11- You are halfway through. Take a deep breath.


Phase 4 – Making Sure PHP Behaves Well With Apache

1- Open Notepad. Type the words shown below, exactly as it is.



2- Save the file as info.php. Place it exactly in the htdocs directory, as shown in the picture.



3- Open your favorite browser. Type http:\\localhost\info.php (or you can type your FQDN followed with info.php)



4- If you can see the purple PHP info screen, you are doing an excellent job following instructions :) .


Phase 5 – MySQL Installation and Configuration

1- Run the MySQL 5.1.62 installer.



2- Accept the terms and conditions.



3- Choose “Typical” for Setup Type.



4- Press “Install” to install MySQL (wow!)



5- Wait and press Next two times to get to the last MySQL installation screen.




6- Make sure “Configure the MySQL server now” is selected and press “Finish”.



7- Press “Next” on the first screen of MySQL Instance Configuration Wizard.



8- Choose “Detailed Configuration”.



9- Choose “Developer Machine”.



10- Choose “Multifunctional Database”.



11- Press “Next” on the InnoDB Tablespace Settings screen.



12- Choose “Decision Support (DSS)/OLAP”.



13- Make sure “Enable TCP/IP Networking” and “Enable Strict Mode” are selected. Leave the port number to the default 3306.



14- Choose “Standard Character Set”.



15- Make sure “Install as a Windows service” and “Include Bin Directory in Windows Path” are selected.



16- Select “Modify Security Settings” and enter your password two times. DO NOT FORGET this password. You may need it in the future!

mysql-old (2)


17- Press “Execute” to install MySQL 5.1.62.



18- On the last screen, make sure everything is okay and press “Finish” to complete the installation.



Phase 6 – Making Sure MySQL 5.1.62 Works

1- Open the command prompt.


2- Type “netstat -na”. If you can see the line with the 3306 port number and its status is LISTENING, MySQL is working well in the background.



3- Say hooray!


If you managed to end up here, that means that you have successfully install Apache 2.2, PHP 5.3 and MySQL 5.1 Installation on Windows 7. If you think that this installation guide is the easiest around, leave a comment below. If not, thanks for reading the guide up and of course; you are welcome to throw in some critiques (hehe!)


Related Posts:

  1. 13 Responses to “The Easiest Guide To Apache 2.2, PHP 5.3 and MySQL 5.1 Server Installation On Windows 7”

  2. Hi!
    I’ve followed every step of the tutorial but yet at Phase-3 step-10, The apache server is not showing the integration of php. Can you kindly help.

    By Josyula on Jun 17, 2012

  3. should be no problem. make sure you are installing the exact version of software as instructed above.

    By Syahid A. on Jun 19, 2012

  4. I had this problem as well … restarting the computer seemed to be the solution. :)

    By MemorySeeker on Aug 13, 2012

  5. Worked perfectly, thank you! :) bookmarking for future reference. Although at this time the MySQL link isn’t working but I did manage to go through the site and use the 5.1.62 MSI and it worked perfectly. your instructions worked exactly the same for that version. :)

    By ashe on Dec 29, 2012

  6. Sir,
    This tutorial is very easy to understand and easy to instal.
    Thank u very much sir.

    By kalyan kumar on Mar 20, 2013

  7. it’s indeed the easiest or simplest way.
    clear and informative.


    By ibrahim on Apr 6, 2013

  8. Thank you very much. Worked perfectly.

    By Saba on Apr 12, 2013

  9. Great Guide! I got a little stuck on the installation of MySQL because apparently I had previously installed it and must have forgotten it. Since there was another instance of MySQL, the wizard would not finish properly. To fix this, I uninstalled the previous instance of MySQL and Restarted the computer (The magic fix). Then I tried running the MySQL .exe file and chose “repair”. The wizard finished quickly and I moved on to the next step in the guide just to realize everything seemed in order. I can’t wait to start testing my new php knowledge! Thanks a lot for the guide!!

    I suggest you have some kind of link to FAQs or solutions to common problems in the installation. After all many people have many different things going on in their computer. But overall, this was an excellent and well-written guide! Cheers! :)

    By Art on Apr 20, 2013

  10. It was crystal clear and helped a lot to make it as easy as possible. Thanks much :) appreciate your help .

    By Raghu on May 26, 2013

  11. Very useful. I did exactly as stated and voila! It is so simple and system behaves exactly as shown in screen-shots! Thanks a tonne Author!

    By Saurabh on May 30, 2013

  12. My friend, thanks for this a million.

    Either I am a complete idiot (which would surprise the company that pays me vast sums to do what I do, succesfully, for a living) or there are lot of people out there who are talking rubbish, copying and pasting other peoples rubbish, or completely failing to communicate.

    After spending 3 hours determined to learn how to configure apache/php by hand I gave up, uninstalled and reinstalled as per the above, very well written, guide (except with mySQL 5.6). 10 minutes later my system is up and running. Yippeeee!

    Why was it so hard before? Because the edits to the httpd.conf file given on other guides (that I read, and that’s about 15 of them) are not only unclear/misleading but just plain WRONG!

    People we need a new rating method for websites/pages that are full of crap. Something that allows us to sticky tag when bullshit is spread. Hey! maybe that’s where we will all make our millions!

    This one, however gets the glory. Thanks again. Amillion gold stars.

    By Dean on Jul 14, 2013

  13. very useful,precise and accurate guide.ended uo after long hours of attempting ti install php.the best guide,which really helps..thank you verymuch

    By ajith sanjay on Jul 16, 2013

  14. Thanks for this tutorial. I followed the steps exactly and I managed to install it correctly.

    By Kieran on Jul 19, 2013

Post a Comment