最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【也许彻底解决】Apache HTPP Server has stopped working

apache crifan 9554浏览 0评论

【问题】

环境:Win7 x64 + Apache/2.2.19 (Win64) PHP/5.3.6

启动Win7后,跳出错误对话框:

Apache HTPP Server has stopped workingApache HTPP Server has stopped working

错误详细信息为:

Files that help describe the problem:
  C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_ca4cbfa9229b66885598e9f97694d8d4d1b252e_cab_18aa18dc\WER140C.tmp.appcompat.txt
  C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_ca4cbfa9229b66885598e9f97694d8d4d1b252e_cab_18aa18dc\WER1499.tmp.WERInternalMetadata.xml
  C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_ca4cbfa9229b66885598e9f97694d8d4d1b252e_cab_18aa18dc\WER172B.tmp.mdmp

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

对此错误,需要说明一下:

1. 之前apache一直都是正常运行的,没有出现过类似问题。

2. 最近几天,出现过几次此问题了。

3. 本地localhost装的是wordpress。

【解决过程】

1.看起来是Apache出问题了。所以就去看看是不是apache已经停止了。

去win7中的services中却看到Apache是正在运行的:

apache2.2 started in service

2. 然后又去确认了一下localhost,也是工作的:

localhost is working

3.网上找了一堆,但是没找到解决办法:

(1)这人说是“如果用xmapp下的xampp-control.exe来启动apache,debug时会造成Apache HTTP Server has stopped working所以建议用apache_start.bat来启动”,但我这里没有用xampp,而是之前自己手动装的apache,以及php等环境,所以也就没有啥apache_start.bat了。

(2)参考Apache HTTP Server has stopped working,倒是想到了,最近是装了个joomla,难道是因为joomla而导致的apache运行出错?暂时也不清楚。

(3)参考这里,想到了去看看apache的log,就去

httpd-2.2.19-win64\httpd-2.2-x64\logs\error.log

中,找到了相关的log:

[Fri Aug 10 09:19:47 2012] [warn] pid file D:/tmp/WordPress/DevRoot/httpd-2.2.19-win64/httpd-2.2-x64/logs/httpd.pid overwritten — Unclean shutdown of previous Apache run?
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 728 in Unknown on line 0
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 880 in Unknown on line 0
[Fri Aug 10 09:19:48 2012] [notice] Apache/2.2.19 (Win64) PHP/5.3.6 configured — resuming normal operations
[Fri Aug 10 09:19:48 2012] [notice] Server built: May 28 2011 15:18:56
[Fri Aug 10 09:19:48 2012] [notice] Parent: Created child process 2200
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 728 in Unknown on line 0
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 880 in Unknown on line 0
[Fri Aug 10 09:19:48 2012] [notice] Child 2200: Child process is running
[Fri Aug 10 09:19:48 2012] [notice] Child 2200: Acquired the start mutex.
[Fri Aug 10 09:19:48 2012] [notice] Child 2200: Starting 64 worker threads.
[Fri Aug 10 09:19:48 2012] [notice] Child 2200: Starting thread to listen on port 80.
[Fri Aug 10 09:21:49 2012] [notice] Parent: child process exited with status 255 — Restarting.
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 728 in Unknown on line 0
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 880 in Unknown on line 0
[Fri Aug 10 09:21:49 2012] [notice] Apache/2.2.19 (Win64) PHP/5.3.6 configured — resuming normal operations
[Fri Aug 10 09:21:49 2012] [notice] Server built: May 28 2011 15:18:56
[Fri Aug 10 09:21:49 2012] [notice] Parent: Created child process 6556
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 728 in Unknown on line 0
PHP Deprecated:  Comments starting with ‘#’ are deprecated in D:\\tmp\\WordPress\\DevRoot\\php-5.3.6-Win32-VC9-x64\\php.ini on line 880 in Unknown on line 0
[Fri Aug 10 09:21:49 2012] [notice] Child 6556: Child process is running
[Fri Aug 10 09:21:49 2012] [notice] Child 6556: Acquired the start mutex.
[Fri Aug 10 09:21:49 2012] [notice] Child 6556: Starting 64 worker threads.
[Fri Aug 10 09:21:49 2012] [notice] Child 6556: Starting thread to listen on port 80.

可以看出:

(1)“Unclean shutdown of previous Apache run?”

不过我之前关机都是正常的,apache服务的启动和关闭,应该也是正常的才对,至少没看到有啥错误和异常啊。

不过其后面又“resuming normal operations”所以应该也没啥影响才对。

(2)看到第一次创建子进程出错“Parent: child process exited with status 255”,不过第二次重新创建的子进程,是OK的“Child 6556: Child process is running”,所以,貌似都还算正常。

(3)728和880两行有问题,所以去:

把728行的 #post_max_size = 8M 改为: ;post_max_size = 8M

把880行的 #upload_max_filesize = 2M 改为:;upload_max_filesize = 2M

再去重启apache服务:

apache restart

结果一切正常,没有任何错误提示。

4。后来根据最开始的crash提示,去看了看:

C:\ProgramData\Microsoft\Windows\WER\ReportQueue\

中的WER140C.tmp.appcompat.txt,不过也没太看懂。

 

【总结】

截止目前,好像没什么大影响。

等以后看看是否还会出现此错误,再说。


【后记 2012-08-16】

结果今天,又遇到同样的问题,出现:Apache HTPP Server has stopped working

1. 根据错误的详细信息:

Files that help describe the problem:
  C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_ca4cbfa9229b66885598e9f97694d8d4d1b252e_cab_01f61c27\WER1515.tmp.appcompat.txt
  C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_ca4cbfa9229b66885598e9f97694d8d4d1b252e_cab_01f61c27\WER15D1.tmp.WERInternalMetadata.xml
  C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_ca4cbfa9229b66885598e9f97694d8d4d1b252e_cab_01f61c27\WER1A65.tmp.mdmp

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

去打开文件夹

C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_ca4cbfa9229b66885598e9f97694d8d4d1b252e_cab_01f61c27

可以找到几个相关的文件:

Report.wer

WER1A65.tmp.mdmp

WER15D1.tmp.WERInternalMetadata.xml

WER15F2.tmp.hdmp

WER1515.tmp.appcompat.txt

其中,Report.wer中的内容为:

Version=1
EventType=APPCRASH
EventTime=129895525809807749
ReportType=2
Consent=1
UploadTime=129895532621914304
ReportIdentifier=1f46a266-e73e-11e1-a489-d067e50a5580
IntegratorReportIdentifier=1f46a265-e73e-11e1-a489-d067e50a5580
Response.BucketId=72888041
Response.BucketTable=4
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=httpd.exe
Sig[1].Name=Application Version
Sig[1].Value=2.2.19.0
Sig[2].Name=Application Timestamp
Sig[2].Value=4de0f645
Sig[3].Name=Fault Module Name
Sig[3].Value=php5ts.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=5.3.6.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=4d90eea6
Sig[6].Name=Exception Code
Sig[6].Value=c0000005
Sig[7].Name=Exception Offset
Sig[7].Value=000000000000f7f7
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.256.4
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=8c9d
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=8c9dc35db402f92aa89f623be45f800c
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=18e3
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=18e3c51e80c775a18de41c53f8b1247d
UI[2]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\httpd.exe
UI[5]=Check online for a solution (recommended)
UI[6]=Check for a solution later (recommended)
UI[7]=Close
UI[8]=Apache HTTP Server stopped working and was closed
UI[9]=A problem caused the application to stop working correctly. Windows will notify you if a solution is available.
UI[10]=&Close
LoadedModule[0]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\httpd.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\system32\kernel32.dll
LoadedModule[3]=C:\Windows\system32\KERNELBASE.dll
LoadedModule[4]=C:\Windows\System32\SYSFER.DLL
LoadedModule[5]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\libapr-1.dll
LoadedModule[6]=C:\Windows\system32\ADVAPI32.dll
LoadedModule[7]=C:\Windows\system32\msvcrt.dll
LoadedModule[8]=C:\Windows\SYSTEM32\sechost.dll
LoadedModule[9]=C:\Windows\system32\RPCRT4.dll
LoadedModule[10]=C:\Windows\system32\WS2_32.dll
LoadedModule[11]=C:\Windows\system32\NSI.dll
LoadedModule[12]=C:\Windows\system32\MSWSOCK.dll
LoadedModule[13]=C:\Windows\system32\user32.dll
LoadedModule[14]=C:\Windows\system32\GDI32.dll
LoadedModule[15]=C:\Windows\system32\LPK.dll
LoadedModule[16]=C:\Windows\system32\USP10.dll
LoadedModule[17]=C:\Windows\system32\SHELL32.dll
LoadedModule[18]=C:\Windows\system32\SHLWAPI.dll
LoadedModule[19]=C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.5054_none_08e4d1f3a83cf865\MSVCR90.dll
LoadedModule[20]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\libaprutil-1.dll
LoadedModule[21]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\libapriconv-1.dll
LoadedModule[22]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\libhttpd.dll
LoadedModule[23]=C:\Windows\system32\IMM32.DLL
LoadedModule[24]=C:\Windows\system32\MSCTF.dll
LoadedModule[25]=C:\Windows\system32\DNSAPI.dll
LoadedModule[26]=C:\Windows\system32\PGPlsp.dll
LoadedModule[27]=C:\Windows\System32\wshtcpip.dll
LoadedModule[28]=C:\Windows\system32\NLAapi.dll
LoadedModule[29]=C:\Windows\system32\napinsp.dll
LoadedModule[30]=C:\Windows\system32\pnrpnsp.dll
LoadedModule[31]=C:\Windows\System32\winrnr.dll
LoadedModule[32]=C:\Program Files\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL
LoadedModule[33]=C:\Windows\system32\PSAPI.DLL
LoadedModule[34]=C:\Program Files\National Instruments\Shared\mDNS Responder\nimdnsNSP.dll
LoadedModule[35]=C:\Windows\system32\nimdnsResponder.dll
LoadedModule[36]=C:\Windows\system32\Iphlpapi.DLL
LoadedModule[37]=C:\Windows\system32\WINNSI.DLL
LoadedModule[38]=C:\Windows\System32\fwpuclnt.dll
LoadedModule[39]=C:\Windows\system32\rasadhlp.dll
LoadedModule[40]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_actions.so
LoadedModule[41]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_alias.so
LoadedModule[42]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_asis.so
LoadedModule[43]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_auth_basic.so
LoadedModule[44]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_authn_default.so
LoadedModule[45]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_authn_file.so
LoadedModule[46]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_authz_default.so
LoadedModule[47]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_authz_groupfile.so
LoadedModule[48]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_authz_host.so
LoadedModule[49]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_authz_user.so
LoadedModule[50]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_autoindex.so
LoadedModule[51]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_cgi.so
LoadedModule[52]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_dir.so
LoadedModule[53]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_env.so
LoadedModule[54]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_include.so
LoadedModule[55]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_isapi.so
LoadedModule[56]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_log_config.so
LoadedModule[57]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_mime.so
LoadedModule[58]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_negotiation.so
LoadedModule[59]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_rewrite.so
LoadedModule[60]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\modules\mod_setenvif.so
LoadedModule[61]=D:\tmp\WordPress\DevRoot\php-5.3.6-Win32-VC9-x64\php5apache2_2.dll
LoadedModule[62]=D:\tmp\WordPress\DevRoot\php-5.3.6-Win32-VC9-x64\php5ts.dll
LoadedModule[63]=C:\Windows\system32\OLEAUT32.dll
LoadedModule[64]=C:\Windows\system32\ole32.dll
LoadedModule[65]=C:\Windows\system32\ODBC32.dll
LoadedModule[66]=C:\Windows\system32\odbcint.dll
LoadedModule[67]=D:\tmp\WordPress\DevRoot\php-5.3.6-Win32-VC9-x64\ext\php_mysql.dll
LoadedModule[68]=D:\tmp\WordPress\DevRoot\php-5.3.6-Win32-VC9-x64\ext\php_mysqli.dll
LoadedModule[69]=D:\tmp\WordPress\DevRoot\php-5.3.6-Win32-VC9-x64\ext\php_openssl.dll
LoadedModule[70]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\SSLEAY32.dll
LoadedModule[71]=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\LIBEAY32.dll
LoadedModule[72]=D:\tmp\WordPress\DevRoot\php-5.3.6-Win32-VC9-x64\ext\php_sockets.dll
LoadedModule[73]=C:\Windows\System32\wship6.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
State[1].Key=DataRequest
State[1].Value=iData=1/nDumpFile=//Upload//iCab//7aee2a1a2ec34451a0cadd4eb7720388-1d20366d89332be3b3eff5e91d2de27b-4-72888041-AppCrash64-6-1-7601-2.cab/nDumpServer=watson.microsoft.com/nResponseServer=watson.microsoft.com/nResponseURL=//dw//StageFour64.asp?iBucket=72888041&szCab=7aee2a1a2ec34451a0cadd4eb7720388.cab&EventType=AppCrash64&BucketHash=1d20366d89332be3b3eff5e91d2de27b&MID=C48E1B1F-F69C-40D7-84BA-C696F133C94D/nBucket=72888041/nBucketTable=4/nResponse=1/n
State[2].Key=Headless.2ndLevelConsentNeeded
State[2].Value=1
File[0].CabName=AppCompat.txt
File[0].Path=WER1515.tmp.appcompat.txt
File[0].Flags=65538
File[0].Type=5
File[0].Original.Path=C:\Windows\Temp\WER1515.tmp.appcompat.txt
File[1].CabName=WERInternalMetadata.xml
File[1].Path=WER15D1.tmp.WERInternalMetadata.xml
File[1].Flags=65538
File[1].Type=5
File[1].Original.Path=C:\Windows\Temp\WER15D1.tmp.WERInternalMetadata.xml
File[2].CabName=memory.hdmp
File[2].Path=WER15F2.tmp.hdmp
File[2].Flags=2097152
File[2].Type=3
File[2].Original.Path=C:\Windows\Temp\WER15F2.tmp.hdmp
File[3].CabName=minidump.mdmp
File[3].Path=WER1A65.tmp.mdmp
File[3].Flags=2162690
File[3].Type=2
File[3].Original.Path=C:\Windows\Temp\WER1A65.tmp.mdmp
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=Apache HTTP Server
AppPath=D:\tmp\WordPress\DevRoot\httpd-2.2.19-win64\httpd-2.2-x64\bin\httpd.exe

可见,其中最后的那部分,指出了错误所涉及的程序是apache的httpd.exe,事件为Stopped working

而中间的内容列出了相关的httpd和php所加载的模块,看起来感觉是好加载的模块有关。

再加上之前好像一直没出错,前不久折腾joomla时,而加载了几个额外的module,感觉估计和这个错误有关。

 

另外,相关的httpd的log如下:

[Thu Aug 16 09:01:00 2012] [warn] pid file D:/tmp/WordPress/DevRoot/httpd-2.2.19-win64/httpd-2.2-x64/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Aug 16 09:01:01 2012] [notice] Apache/2.2.19 (Win64) PHP/5.3.6 configured -- resuming normal operations
[Thu Aug 16 09:01:01 2012] [notice] Server built: May 28 2011 15:18:56
[Thu Aug 16 09:01:01 2012] [notice] Parent: Created child process 2064
[Thu Aug 16 09:01:01 2012] [notice] Child 2064: Child process is running
[Thu Aug 16 09:01:01 2012] [notice] Child 2064: Acquired the start mutex.
[Thu Aug 16 09:01:01 2012] [notice] Child 2064: Starting 64 worker threads.
[Thu Aug 16 09:01:01 2012] [notice] Child 2064: Starting thread to listen on port 80.
[Thu Aug 16 09:03:02 2012] [notice] Parent: child process exited with status 255 -- Restarting.
[Thu Aug 16 09:03:02 2012] [notice] Apache/2.2.19 (Win64) PHP/5.3.6 configured -- resuming normal operations
[Thu Aug 16 09:03:02 2012] [notice] Server built: May 28 2011 15:18:56
[Thu Aug 16 09:03:02 2012] [notice] Parent: Created child process 1328
[Thu Aug 16 09:03:03 2012] [notice] Child 1328: Child process is running
[Thu Aug 16 09:03:03 2012] [notice] Child 1328: Acquired the start mutex.
[Thu Aug 16 09:03:03 2012] [notice] Child 1328: Starting 64 worker threads.
[Thu Aug 16 09:03:03 2012] [notice] Child 1328: Starting thread to listen on port 80.

 

2.另外又看到:Apache HTTP server has stopped working中也提到了,和加载的(多余的)模块有关系。

而之前关于给wordpress折腾添加smtp,也没成功

所以,干脆先把之前加载的模块去掉再说,希望先解决此问题。

真的等以后需要这些模块的时候,再添加回来。

即把:

extension=php_sockets.dll

extension=php_openssl.dll

改为:

;extension=php_sockets.dll

;extension=php_openssl.dll

然后再去重启apache,希望这样可以解决此问题。

【总结】

如果以后不再出现此问题,那么就可以定位错误原因为:

某些php的模块,导致了apache停止工作。

具体是哪个或哪些模块,则需要具体情况具体分析了。有的可能是本身php模块就有bug,有的可能是没有和其他模块搭配好等等。可以尝试一点点注释掉那些看起来可能出错的php模块,以此最终定位出错的模块。

转载请注明:在路上 » 【也许彻底解决】Apache HTPP Server has stopped working

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. 大哥你好,最近我也遇到和你这类似的问趧,还不知道怎么解决。 想问问,你最后是用什么方法解决这个问趧的。我是小白看不明白错误日志。若你有空帮我看看服务器也行。谢谢
    靠谱拿货网8年前 (2016-09-11)回复
93 queries in 0.186 seconds, using 22.05MB memory