mkarmali — 2012-08-19T17:43:20-04:00 — #1
I recently installed Apache, php and mysql on my Windows 7 machine.
When I enter "http://localhost/index.php" the first time, nothing happens. It seems like it's looking for the web page. The browser doesn't respond.
But when I stop the browser and enter the url the second time it responds correctly.
I always have to enter the url twice for it to work.
Does any one know why this is happening?
parkint — 2012-08-19T18:06:21-04:00 — #2
Welcome to Sitepoint.
I am not sure, off hand, why you are experience this behavior.
I would try, first, clearing the cache in your browser. Also, do you get the same result if you enter just "localhost" in the address bar? The default Apache configuration will look for 'index.php'.
mkarmali — 2012-08-19T18:43:12-04:00 — #3
Thanks for your response.
if I say "localhost" it gives me the right web page but again it has to be done twice.
How do I clear the cache in my browser?
The apache error log gives me:
[Sun Aug 19 14:12:50.328873 2012] [mpm_winnt:warn] [pid 2616:tid 980] (OS 64)The specified network name is no longer available. : AH00341: winnt_accept: Asynchronous AcceptEx failed.
edgarzakaryan — 2012-08-20T10:35:28-04:00 — #4
It's depend in which browser are you using.
And about apache log. When you are opening your localhost page in browser, does that line being add all the time?
cups — 2012-08-20T13:17:53-04:00 — #5
check you windows hosts file (mine is at C:\WINDOWS\system32\drivers\etc\hosts)
add this line: (no need to reboot)
Or use 127.0.0.1 instead of localhost.
Does that do it?
mkarmali — 2012-08-20T15:36:21-04:00 — #6
It works! Here is the answer courtesy of glsmith moderator at apachelounge.com:
Add somewhere in the global context of the config
AcceptFilter http none
Once you're running 2.4.3 you can also add
AcceptFilter https none
for SSL connections. This last one can only be done once running 2.4.3 as it's been broken for a long time and finally fixed.