Thursday, 21 November 2013

How to run WAMP Server on Windows 8


The thing is that Windows 8 is an IPV6-first Operating System and WAMP is, by default, configured to run with IPV4 only. This creates a conflict and hence we face this problem. To confirm that Windows 8 uses IPV6. Open the command prompt and type ping localhost and press the Enter key. You'll receive a reply from ::1 which is the loopback address for IPV6. 

So in order to properly tackle this problem, there's no need to follow the steps I mentioned in    my earlier post. Although my older post might have solved your problem, it isn't a proper solution. Here's what you should actually be doing.

Step # 1 - Changes in httpd.conf file

  • Goto the WAMP folder (in my case, I've installed it in my E drive) > inside it double click the bin folder > then apache > apache2.2.22 (or whatever version you have) > conf > inside this folder, you'll see a file named httpd which has a file type of CONF. Right-click on this file and open it with Notepad.
httpd file inside conf folder

  • After you've opened the httpd file in Notepad, press Ctrl + F or goto Edit > Find and search for Listen 80 text. After you find this text, just add a (hash symbol) at the start of this line to comment/or make it inactive. Then type the following text on the next line - Listen 0.0.0.0:80. Save and close this file and close Notepad.

Editing in httpd file

Step # 2 - Changes in the hosts file
  • Open Notepad again, but this time as an administrator, and open the hosts file. To do this in Windows 8, press the Window Key + W to open the Search app or alternatively, press the Window Key and directly type your search term. In this case we want to search for Notepad
Search for Notepad in Windows 8

  • After you see the Notepad application icon, right-click on it and you'll see some options at the bottom of the screen. One of them reads Run as administrator. Click on it and Notepad will run as an administrator.
How to run an app as an administrator

  • Inside Notepad, click on File > Open and go to the following location, C: > Windows > System32 > Drivers > etc. Inside this etc folder you won't probably see any file which is because the file type in the bottom-right corner is set to Text Document (.txt). Select the dropdown again and select the option of All. You'll immediately see a file named hosts. Double click on it to open it in Notepad.
Open Dialog of Notepad


  • Inside the hosts file, make sure that the line with ::1 localhost written on it is commented (by using the # symbol as explained above) and the line that has 127.0.0.1 localhost is uncommented (in simple words it should not have # sign at the start of the line). Save and close this file as well as Notepad. 
Editing in hosts file using Notepad
Step # 3 (Final Step) - Restart WAMP
  • I don't think this needs any explaination. But I'll explain it anyway. Click on the WAMP system tray icon at the bottom-right of the screen and select the Restart All Services option. That's it. You're done.

Restart WAMP

After restarting WAMP, open your browser of choice and type localhost. And there you go. As for the phpmyadmin, don't worry, just type localhost/phpmyadmin and yes it works too. 

No comments:

Post a Comment