最近在幾台機上面使用xampp還有APMser等的PHP服務器,但是都遇到無法啟動或者啟動後自動關閉的問題,研究了很久,發現好像無論是Apache還是Nginx存在問題,那麼就可以斷定問題是出在電腦本身,可能是IP協議之類,在Apache的log下的error.log看到:
[Sun Jul 24 14:00:04 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Jul 24 14:00:04 2011] [notice] Digest: done
[Sun Jul 24 14:00:05 2011] [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
[Sun Jul 24 14:00:05 2011] [notice] Server built: Nov 11 2009 14:29:03
[Sun Jul 24 14:00:05 2011] [notice] Parent: Created child process 2184
[Sun Jul 24 14:00:07 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Jul 24 14:00:07 2011] [notice] Digest: done
[Sun Jul 24 14:00:08 2011] [notice] Child 2184: Child process is running
[Sun Jul 24 14:00:08 2011] [crit] (OS 10022)提供了一個無效的參數。 : Child 2184: setup_inherited_listeners(), WSASocket failed to open the inherited socket.
[Sun Jul 24 14:00:08 2011] [crit] Parent: child process exited with status 3 -- Aborting.
研究後發現是TCI/IP協議的問題,解決問題方法如下:
解決辦法:
1.網上鄰居->本地連接->屬性->internet協議(TCP/IP)->屬性->高級->wins標簽->去掉啟用LMhosts查詢前的勾.
我就是用這個方法解決的,如果還是不行,就往下繼續嘗試吧
2.控制面版->windows防火牆->高級標簽->本地連接設置->服務的標簽裡勾選安全Web服務器(HTTPS)即可.
(這上下兩項完成後仍然有問題,選中:啟用 TCI/IP 上的 NetBOIS.)
3.在運行裡輸入:netsh winsock reset
有人提到是winsock的問題,嘗試修復winsock,只要直接在運行裡輸入:
netsh winsock reset
連提示重啟都不用,就OK啦···