PHP Apache shutdown unexpectedly启动错误解释及解决的方法
2017-06-11 12:22
501 查看
在学PHP的时候,偶然发现XAMPP窗体Apache的启动出现错误,出现下面的错误提示:
9:52:41 [Apache] Attempting to start Apache app...
9:52:41 [Apache] Status change detected: running
9:52:42 [Apache] Status change detected: stopped
9:52:42 [Apache] Error: Apache shutdown unexpectedly.
9:52:42 [Apache] This may be due to a blocked port, missing dependencies,
9:52:42 [Apache] improper privileges, a crash, or a shutdown by another method.
9:52:42 [Apache] Check the "/xampp/apache/logs/error.log" file
9:52:42 [Apache] and the Windows Event Viewer for more clues
这个问题比較常见, 一般是80、443port被占用
cmd 通过执行apache/bin/httpd.exe 打印例如以下log:
通过执行cmd ,输入命令行 netstat -a 查看全部的被占用的port;例如以下图:
如图可知, 443的port被占用了,导致Apache 无法正常启动;
解决的方法例如以下:
(OS 10048)通常每一个套接字地址(协议/网络地址/port)仅仅同意使用一次。 : make_sock: could not bind to address 0.0.0.0:443
或者后面是80port被占用
(OS 10048)通常每一个套接字地址(协议/网络地址/port)仅仅同意使用一次。
: make_sock: could not bind to address 0.0.0.0:80 或[ : : ]:80
一、最快的处理方法就是改动port号:
1、443port被占用。apache无法监听443port,该怎样解决呢?
在/xampp/apache/conf/extra/httpd-ssl.conf
把Listen 443 改动为 444(可自己定义)
2、80port被占用,apache无法监听80port。该怎样解决呢?
在/xampp/apache/conf/extra/httpd.conf
把Listen 80 改动为 88 (可自己定义)
假设配置了vhosts的话请把httpd-vhosts.conf 中port改为88(同上port号)
二、最直接的方法是关闭占用80、443port的进程:
1. 通过cmd中netstat -ano 看看本机80、 443port被占用没 ----- --这里 可能会被其它程序占用如iis、虚拟机等
2.通过cmd中打印tasklist,查找占用80、443port的进程名称。
3.taskkill /pid port号 杀掉此进程名称。XAMPP重新启动apache就可以。
综上所述第一种方法推荐使用,另外一种每次启动都或多或少的再次遇到。
9:52:41 [Apache] Attempting to start Apache app...
9:52:41 [Apache] Status change detected: running
9:52:42 [Apache] Status change detected: stopped
9:52:42 [Apache] Error: Apache shutdown unexpectedly.
9:52:42 [Apache] This may be due to a blocked port, missing dependencies,
9:52:42 [Apache] improper privileges, a crash, or a shutdown by another method.
9:52:42 [Apache] Check the "/xampp/apache/logs/error.log" file
9:52:42 [Apache] and the Windows Event Viewer for more clues
这个问题比較常见, 一般是80、443port被占用
cmd 通过执行apache/bin/httpd.exe 打印例如以下log:
通过执行cmd ,输入命令行 netstat -a 查看全部的被占用的port;例如以下图:
如图可知, 443的port被占用了,导致Apache 无法正常启动;
解决的方法例如以下:
(OS 10048)通常每一个套接字地址(协议/网络地址/port)仅仅同意使用一次。 : make_sock: could not bind to address 0.0.0.0:443
或者后面是80port被占用
(OS 10048)通常每一个套接字地址(协议/网络地址/port)仅仅同意使用一次。
: make_sock: could not bind to address 0.0.0.0:80 或[ : : ]:80
一、最快的处理方法就是改动port号:
1、443port被占用。apache无法监听443port,该怎样解决呢?
在/xampp/apache/conf/extra/httpd-ssl.conf
把Listen 443 改动为 444(可自己定义)
2、80port被占用,apache无法监听80port。该怎样解决呢?
在/xampp/apache/conf/extra/httpd.conf
把Listen 80 改动为 88 (可自己定义)
假设配置了vhosts的话请把httpd-vhosts.conf 中port改为88(同上port号)
二、最直接的方法是关闭占用80、443port的进程:
1. 通过cmd中netstat -ano 看看本机80、 443port被占用没 ----- --这里 可能会被其它程序占用如iis、虚拟机等
2.通过cmd中打印tasklist,查找占用80、443port的进程名称。
3.taskkill /pid port号 杀掉此进程名称。XAMPP重新启动apache就可以。
综上所述第一种方法推荐使用,另外一种每次启动都或多或少的再次遇到。
相关文章推荐
- Apache shutdown unexpectedly启动错误解决方法
- Apache shutdown unexpectedly启动错误解决方法
- Apache shutdown unexpectedly启动错误解决方法
- PHP Apache shutdown unexpectedly启动错误解释及解决的方法
- Apache shutdown unexpectedly启动错误解决方法
- PHP Apache shutdown unexpectedly启动错误解释及解决办法
- xampp启动apache时出现[Apache] Error: Apache shutdown unexpectedly 错误的解决方法
- Windows下PHP安装路径配置错误导致Apache无法启动的解决方法
- Windows下PHP+Eclipse开发环境搭建 及错误解决(apache2.2服务无法启动 发生服务特定错误:1)
- Apache shutdown unexpectedly启动错误解决方法
- apache2.2和php5.2.17在windows下整合过程的错误解决方法
- Apache无法启动,终极解决方法,适用于“应用程序无法正常启动 0xc000007b”错误
- 关于php中header()、setcookie()、session_start()函数错误的解决方法和解释
- Apache http服务器整合php出现httpd.exe应用程序错误的解决方法
- Apache shutdown unexpectedly启动错误解决方法
- Apache启动提示错误undefined symbol: libiconv_open解决方法
- php的wamp服务器的wampapache启动时遇到80端口被system占用的解决方法
- Apache shutdown unexpectedly解决方法
- Apache启动时报php_ldap.dll找不到指定的模块错误的解决
- 已解决:好用的集成PHP环境 一键安装包PHPNow--Win7下安装phpnow的方法出现[ Apache_pn ] 错误的解决 !(亲自测试通过)