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?
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'.
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.
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?
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?
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.
This topic is now closed. New replies are no longer allowed.