How did I solved issues with Windows 8 – WAMP Server issues

on Friday, November 02, 2012
I was not a huge PHP fanatic, yet I got to use it to do my University project. So in that case I was instructed to use WAMP Server for my localhost server which in-build with Apache, MySQL, PHP and Web Grind. I installed Windows 8 few weeks ago, but I could not figure out a way which I can install WAMP Server in it. Because the error message says

“Forbidden
You don't have permission to access / on this server.”

But when I type 127.0.0.1 it is working indeed.
So I was thinking with my previous experiences it should something has to be done with the httpd.conf file and the regedit of Windows 8.

Here I how solved the issue.

1.     Test the port which Apache runs. Go to WAMP Server -> Apache -> Service -> Test Port 80. It will give a command prompt message whether it is running on port or not. If it is not running on port 80, you can edit the httpd.conf file. Go to Apache and open up the file in a text editor. Go to line 45 and 46 and check whether the correct port number has been entered. Change it accordingly.

2.      Let’s see what we can do with the registry editor.
Open console (cmd.exe) and execute 

netstat -aon | findstr 0.0:80

to check if the port is controlled by process with ID 4 (System). Otherwise we should kill it (the process with PID != 4) using a task manager.

But what eventually worked for me is to disable a HTTP service of Windows 8:
1) Go to registry editor (execute regedit);
2) proceed to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP;
3) create a new DWORD param with name "NoRun" and set it to "1" (without quotes); 
4) Select the DWORD param according to your OS bit version. I did it with 32-bit;
5) set "Start' param to "0"; 

Now Reboot!

3.     After rebooting, open the httpd.conf again and go to line no 188 and it is a <Directory> tag. Check whether the line 4 of that tag has this -> “Deny from all”. Now change that to “Allow from all” (Without the quotes)

4.     Scroll down to line no 231 and see this -> “#   onlineoffline tag - don't remove”. See the last line says -> “Allow from 127.0.0.1” Change it to “Allow from all”.

Now refresh and see if the localhost works? I guess it will not work until you restart the services again. Once you restart, you are done!

Thank you guys!
Cheers!

0 comments:

Post a Comment