16
2012
APACHE的Win32DisableAcceptEx和Windows WMI服务修复
windows xp x64 sp2 + apache 2.2 为本地网站前台开发调试用,并通过apache转发调用开发服务器的服务器端服务。
经常出问题,apache 的error.log打出成千上万的
[error] (OS 10038)在一个非套接字上尝试了一个操作。 : Child 1676: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive.
搜索了一下,跟AcceptEx有关
尝试在httpd.conf文件中添加 Win32DisableAcceptEx 标记,如下:
\< IfModule mpm_winnt.c\>
ThreadsPerChild 1000
MaxRequestsPerChild 10000
Win32DisableAcceptEx
\</IfModule\>
不好用!!
又尝试1、网上邻居-;本地连接-;属性-;internet协议(TCP/IP)-;属性-;高级-;wins标签-;去掉启用LMhosts查询前的勾. 2、控制面版-;windows防火墙-;高级标签-;本地连接设置-;服务的标签里勾选安全Web服务器(HTTPS)。 3、然后退出Apache,再打开启动就可以了 ,一开始我没有退出,直接在那重启,就是不可以,一定要先停止,在开启即可。
发现WMI服务居然坏了,本地连接的高级标签打不开,提示
Windows不能显示 此连接的属性。Windows Management Instrumentation(Windows管理体系结构组件WMI)信息可能损坏。要更正此问题,请使用系统还原将Windows还原到一个较早的时间点……悲剧,先修复WMI吧,新建批处理,内容如下:
@echo on
cd /d c:\temp
if not exist %windir%\system32\wbem goto TryInstall
cd /d %windir%\system32\wbem
net stop winmgmt
winmgmt /kill
if exist Rep_bak rd Rep_bak /s /q
rename Repository Rep_bak
for %%i in (*.dll) do RegSvr32 -s %%i
for %%i in (*.exe) do call :FixSrv %%i
for %%i in (*.mof,*.mfl) do Mofcomp %%i
net start winmgmt
goto End
:FixSrv
if /I (%1) == (wbemcntl.exe) goto SkipSrv
if /I (%1) == (wbemtest.exe) goto SkipSrv
if /I (%1) == (mofcomp.exe) goto SkipSrv
%1 /RegServer
:SkipSrv
goto End
:TryInstall
if not exist wmicore.exe goto End
wmicore /s
net start winmgmt
:End重启,进安全模式,现在C盘根目录下建立temp文件夹备用,要不然报错。执行后重启,本地连接属性正常了。