apache 错误(OS 10022)提供了一个无效的参数。解决方案

今天在windows下安装xampp套装时apache无法正常启动,具体现象如下:

1.当apache安装为服务时无法启动,在windows服务管理器中启动服务时提示:服务启动后又关闭……

2.apache不安装服务时,可以启动,不久之后自动关闭。

查看apache的日志文件,记录如下:

[Mon Jul 19 21:42:54 2010] [notice] Digest: generating secret for digest authentication …
[Mon Jul 19 21:42:54 2010] [notice] Digest: done
[Mon Jul 19 21:42:55 2010] [notice] Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured — resuming normal operations
[Mon Jul 19 21:42:55 2010] [notice] Server built: Nov 11 2009 14:29:03
[Mon Jul 19 21:42:55 2010] [notice] Parent: Created child process 3420
[Mon Jul 19 21:42:58 2010] [notice] Digest: generating secret for digest authentication …
[Mon Jul 19 21:42:58 2010] [notice] Digest: done
[Mon Jul 19 21:42:58 2010] [notice] Child 3420: Child process is running
[Mon Jul 19 21:42:58 2010] [crit] (OS 10022)提供了一个无效的参数。  : Child 3420: setup_inherited_listeners(), WSASocket failed to open the inherited socket.
[Mon Jul 19 21:42:58 2010] [crit] Parent: child process exited with status 3 — Aborting.

问题:

socket错误

解决方案:

网上邻居–>网络连接–>属性–>TCP/IP属性–>高级–>wins–>去掉启用LMHOSTS查询前面的勾,启动apache 成功!

此条目发表在LAMP分类目录。将固定链接加入收藏夹。