xammp=apache+php+mysql 相当于一个服务集成包吧,主要是帮助用户免去配置的烦恼。
问题描述:
但是xammp也会出问题,通常是启动不了apache服务,一般会显示如下错误信息:
9:20:15 [Apache] Status change detected: stopped <span style="color:#ff0000;">9:20:15 [Apache] Error: Apache shutdown unexpectedly. 9:20:15 [Apache] This may be due to a blocked port, missing dependencies, 9:20:15 [Apache] improper privileges, a crash, or a shutdown by another method. 9:20:15 [Apache] Press the Logs button to view error logs and check 9:20:15 [Apache] the Windows Event Viewer for more clues 9:20:15 [Apache] If you need more help, copy and post this 9:20:15 [Apache] entire log window on the forums</span>
<span style="color:#ff0000;">This may be due to a blocked port, missing dependencies, </span>表面意思是端口冲突,缺少依赖。
查看错误日志:
<span style="color:#ff0000;">[Fri Jan 10 10:22:21.035520 2014] [ssl:warn] [pid 4420:tid 252] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:22:21.588552 2014] [ssl:warn] [pid 4420:tid 252] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:22:21.622554 2014] [mpm_winnt:notice] [pid 4420:tid 252] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 configured -- resuming normal operations [Fri Jan 10 10:22:21.622554 2014] [mpm_winnt:notice] [pid 4420:tid 252] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01 [Fri Jan 10 10:22:21.622554 2014] [core:notice] [pid 4420:tid 252] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Fri Jan 10 10:22:21.627554 2014] [mpm_winnt:notice] [pid 4420:tid 252] AH00418: Parent: Created child process 5252 [Fri Jan 10 10:22:22.901627 2014] [ssl:warn] [pid 5252:tid 264] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:22:23.153642 2014] [ssl:warn] [pid 5252:tid 264] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:22:23.183643 2014] [mpm_winnt:notice] [pid 5252:tid 264] AH00354: Child: Starting 150 worker threads. [Fri Jan 10 10:22:51.154243 2014] [mpm_winnt:crit] [pid 5252:tid 264] AH02538: Child: Parent process exited abruptly. Child process is ending [Fri Jan 10 10:22:51.155243 2014] [mpm_winnt:warn] [pid 5252:tid 424] (OS 995)由于线程退出或应用程序请求,已中止 I/O 操作。 : AH00341: winnt_accept: Asynchronous AcceptEx failed. [Fri Jan 10 10:22:51.156243 2014] [mpm_winnt:warn] [pid 5252:tid 1680] (OS 995)由于线程退出或应用程序请求,已中止 I/O 操作。 : AH00341: winnt_accept: Asynchronous AcceptEx failed. [Fri Jan 10 10:23:01.836854 2014] [ssl:warn] [pid 7528:tid 252] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:23:02.099869 2014] [core:warn] [pid 7528:tid 252] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Fri Jan 10 10:23:02.762907 2014] [ssl:warn] [pid 7528:tid 252] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:23:02.790909 2014] [mpm_winnt:notice] [pid 7528:tid 252] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 configured -- resuming normal operations [Fri Jan 10 10:23:02.790909 2014] [mpm_winnt:notice] [pid 7528:tid 252] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01 [Fri Jan 10 10:23:02.790909 2014] [core:notice] [pid 7528:tid 252] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Fri Jan 10 10:23:02.795909 2014] [mpm_winnt:notice] [pid 7528:tid 252] AH00418: Parent: Created child process 7340 [Fri Jan 10 10:23:03.757964 2014] [ssl:warn] [pid 7340:tid 264] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:23:03.968976 2014] [ssl:warn] [pid 7340:tid 264] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:23:04.004978 2014] [mpm_winnt:notice] [pid 7340:tid 264] AH00354: Child: Starting 150 worker threads. [Fri Jan 10 10:59:08.633788 2014] [ssl:warn] [pid 6956:tid 252] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:59:08.664790 2014] [core:warn] [pid 6956:tid 252] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Fri Jan 10 10:59:08.844800 2014] [ssl:warn] [pid 6956:tid 252] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:59:08.880802 2014] [mpm_winnt:notice] [pid 6956:tid 252] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 configured -- resuming normal operations [Fri Jan 10 10:59:08.880802 2014] [mpm_winnt:notice] [pid 6956:tid 252] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01 [Fri Jan 10 10:59:08.880802 2014] [core:notice] [pid 6956:tid 252] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Fri Jan 10 10:59:08.885802 2014] [mpm_winnt:notice] [pid 6956:tid 252] AH00418: Parent: Created child process 5836 [Fri Jan 10 10:59:09.862858 2014] [ssl:warn] [pid 5836:tid 264] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:59:10.046869 2014] [ssl:warn] [pid 5836:tid 264] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name [Fri Jan 10 10:59:10.083871 2014] [mpm_winnt:notice] [pid 5836:tid 264] AH00354: Child: Starting 150 worker threads. 系统找不到指定的路径。</span>
解决方案:(主要是针对端口问题)
1.常规做法
You shuld run file setup_xampp.bat in XAMP folder first!
2.修改apache监听端口
on your XAMPP control panel, next to apache, select the "Config" option and select the first file (httpd.conf): there, look for the "listen" line (you may use the find tool in the notepad) and there must be a line stating "Listen 80". Note: there are other lines with "listen" on them but they should be commented (start with a #), the one you need to change is the one saying exactly "listen 80". Now change it to "Listen 1337". Start apache now. If the error subsists, it's because there's another port that's already in use. So, select the config option again (next to apache in your xampp control panel) and select the second option this time (httpd-ssl.conf): there, look for the line "Listen 443" and change it to "Listen 7331". Start apache, it should be working now.
3.如果你装了skype,可能是skype占用端口,修改之
If you are using the latest Skype, go to: Tools -> Options -> Advanced -> connection. Disable the 'Use port 80 and 443 for alternatve.. ' Sign Out and Close all Skype windows. Try restart your Apache again.
It means port 80 is already used by another one. Simply follow these steps: Open windows -> click on Run (win + R) -> type services.msc Goto IIS Admin -> Right click on it and click on Stop Option. Open XAMPP click on Start Action of Apache Module, Apache Module is run. OR For find the port of Apache (80) in Command Prompt simply type netstat -aon it displays present used ports on windows, under Local Address column it shown as 0.0.0.0:80. If it displays this port another connection is already used this port number. Active Connections in Windows XP: