Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 阻止apache释放端口80_Mysql_Apache_Wamp_Wampserver - Fatal编程技术网

Mysql 阻止apache释放端口80

Mysql 阻止apache释放端口80,mysql,apache,wamp,wampserver,Mysql,Apache,Wamp,Wampserver,我已经在Windows7-64位上安装了WAMP2.4。它工作正常,而且我能够从本地主机和外部连接它。系统上未安装Skype、IIS或VMware。在里面 “服务”mysql和apache都设置为自动启动,并处于启动状态。WAMP的所有服务都在工作,图标为绿色 现在,问题是,网站经常宕机。当它关闭时,WAMP图标仍然是绿色的,mysql和apache仍然处于“启动”状态。然后每次我只要点击“重启所有服务”,它就会开始工作 当它关闭时,我检查了Apache>Services的“testport80

我已经在Windows7-64位上安装了WAMP2.4。它工作正常,而且我能够从本地主机和外部连接它。系统上未安装Skype、IIS或VMware。在里面 “服务”mysql和apache都设置为自动启动,并处于启动状态。WAMP的所有服务都在工作,图标为绿色

现在,问题是,网站经常宕机。当它关闭时,WAMP图标仍然是绿色的,mysql和apache仍然处于“启动”状态。然后每次我只要点击“重启所有服务”,它就会开始工作


当它关闭时,我检查了Apache>Services的“testport80”,它说这个端口没有被使用。同时,当我在命令提示符下用“netstat”检查端口80时,它会显示apache的进程id。如果我不采取任何行动,一段时间后它就会开始工作。有没有办法将Apache设置为不释放端口80?或者,任何检查端口80的批处理命令,如果它空闲,请重新启动wamp服务?

我以前听说过这个问题,现在我开始考虑它

尝试将这两个参数添加到
httpd.conf
文件中

将它们放在httpd.conf
#EnableSendfile on

# AcceptFilter: Windows, none uses accept () instead of AcceptEx ()
# And do not recycle sockets between connections. This is useful
# Network interfaces for which the pilot is defective, and for
# Some network providers like vpn pilots or filters
# Anti-spam, anti-virus or anti-spyware.
AcceptFilter http none
AcceptFilter https none

幸运的是,这会阻止Apache挂起,我认为这是您的主要问题。

在您的httpd.conf 1中添加以下两行之后,您可以检查一下吗。AcceptFilter http none 2。AcceptFilter:没有。如果apache退出/崩溃,它将释放端口80。相反,请尝试找出它退出的原因-例如,查看错误日志。@否,Apache没有崩溃,它在“已启动”服务和tast manager的服务列表中工作并显示。您确定您的系统上没有运行另一个Apache,可能还有MySQL吗。WAMPServer中的Apache服务称为
wampapache
,而不是
Apache
MySQL服务称为
wampmysql
。这两项服务都配置为手动启动,而不是自动启动,除非您对其进行了更改。