2

Yesterday my life with Apache was fine. As if has been for over a year on my laptop here. However today it has suddenly decided to stop cooperating. I do not understand why and I have been hunting for a solution for hours. It is important as I cannot continue my work.

When accessing any addresses within 'localhost' including 'localhost' itself the browser will continue to load and never ever timeout.

This all seem to have happened after a virus check earlier today and I have found that virus scanners can be the issues. The problem was with with a file called 'service.exe' under the 'system32' directory.

Anyway I have not only disabled my virus scanner but uninstalled it from my system completely. I have added

EnableSendfile Off
EnableMMAP Off
Win32DisableAcceptEx

to the bottom of my httpd.conf file.

I've check the ports and made sure that http.exe is listening to port 80 via its process ID. And that port 80 is the correct port set in the .conf file.

I've restarted apache and my computer many time during all this.

The last few messages is the error log are

[Fri Jun 21 16:05:14 2013] [error] (OS 10038)An operation was attempted on something that is not a socket.  : Too many errors in select loop. Child process exiting.
[Fri Jun 21 16:05:14 2013] [notice] Child 2308: Exit event signaled. Child process is ending.
[Fri Jun 21 16:05:15 2013] [notice] Child 2308: Released the start mutex
[Fri Jun 21 16:05:15 2013] [notice] Child 2308: All worker threads have exited.
[Fri Jun 21 16:05:15 2013] [notice] Child 2308: Child process is exiting
[Fri Jun 21 16:05:15 2013] [notice] Parent: child process exited with status 0 -- Restarting.

Still the page continues to load and never times out. I really have no idea. It has been working for fine on this machine for over a year. Recently I have been using it heavily for development of a new site without any issues. And suddenly for no reason it has stopped work. Possibility because of the action of the virus scanner. However I have had this scanner (AVG) running for almost as long with no issue. Nothing makes sense.

Does anyone have any idea on how to get it work again?

Shane
  • 2,375
  • 4
  • 22
  • 31
  • is the browser saying that it is connected and waiting for a response or is it trying to connect? – akonsu Jun 21 '13 at 14:23
  • I just is loading. IE the browser screen is blank and the page is continually loading. IE messages of 'Waiting for localhost' or 'Connecting...' . It never stops. – Shane Jun 21 '13 at 14:39
  • in other words, it cannot connect to the server. maybe the firewall blocks `apache.exe`? – akonsu Jun 21 '13 at 15:23
  • I completely removed AVG. Hence no firewall there. The windows fire is saying it is not using recommended settings. From what I know it is off. However it looks broken. I cannot seem to turn it on or off. So I'll place with that atm. But based on it warning messages I'd say it is off. No other firewalls. – Shane Jun 21 '13 at 15:35
  • I would try to repair the windows firewall so that you can turn it off or on and then see what happens next. – akonsu Jun 21 '13 at 15:42
  • I've reestablished the firewall and the security centre. Both were missing. I've run a Malwarebytes Anti-Malware scan and a Virus scan with AVG after I reinstalled it again. The firewall is off and no other firewalls are on. Still the same issue. Nothing has changed. Anything else I can try? :( – Shane Jun 22 '13 at 19:33
  • ... do not know.. maybe reinstalling apache? – akonsu Jun 22 '13 at 19:39
  • Uninstalled it and reinstalled from a fresh download. System will not open up localhost on its default settings. Has the same issue as before. Is there anyway I can check to make sure there are no other things blocking it similar to a firewall. – Shane Jun 22 '13 at 21:06
  • Is there any direction I can take. – Shane Jun 22 '13 at 21:08
  • This is the latest error log. – Shane Jun 22 '13 at 21:19
  • [Sat Jun 22 23:18:40 2013] [notice] Child 10216: Released the start mutex [Sat Jun 22 23:18:40 2013] [notice] Child 10216: All worker threads have exited. – Shane Jun 22 '13 at 21:20
  • [Sat Jun 22 23:18:40 2013] [notice] Child 10216: Child process is exiting [Sat Jun 22 23:18:40 2013] [notice] Parent: child process exited with status 0 -- Restarting. [Sat Jun 22 23:18:40 2013] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations [Sat Jun 22 23:18:40 2013] [notice] Server built: Jan 28 2012 11:16:39 – Shane Jun 22 '13 at 21:20
  • [Sat Jun 22 23:18:40 2013] [notice] Parent: Created child process 14252 [Sat Jun 22 23:18:40 2013] [notice] Disabled use of AcceptEx() WinSock2 API [Sat Jun 22 23:18:40 2013] [notice] Child 14252: Child process is running [Sat Jun 22 23:18:40 2013] [notice] Child 14252: Acquired the start mutex. [Sat Jun 22 23:18:40 2013] [notice] Child 14252: Starting 64 worker threads. [Sat Jun 22 23:18:40 2013] [notice] Child 14252: Listening on port 80. – Shane Jun 22 '13 at 21:21
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/32223/discussion-between-akonsu-and-shane) – akonsu Jun 23 '13 at 01:34

1 Answers1

2

In the end I believe the solution was running

Command: netsh winsock reset

I had uninstalled and reinstalled Apache. Still did not fix the issue. As well as disabling all firewalls, uninstalling my virus scanner. I had then run a full system scan and malware scan with no results.

I still believe something happened to my system when my scanner found something a few days before. After reinstalled Apache I started to receive a different error message in the log than the one I have previously.

[error] (OS 10038)An operation was attempted on something that is not a socket.  : Too many errors in select loop. Child process exiting. 

Pinging both localhost and 127.0.0.1 worked without any issues. After more research I came across the above command.

So i needed to run cmd as an administrator, run the command

netsh winsock reset

and restart my system. Now my apache php server seem to be working fine now.

Shane
  • 2,375
  • 4
  • 22
  • 31