LY-幻恋魂影

当前位置:“ 首页 > PHP>wampserver只有1/3个服务正在运行,怎么办? ”
文章目录

wampserver只有1/3个服务正在运行,怎么办?

用户:恋影编辑 时间:2025-04-27 阅读:57 评论:0

1、前言 Wamp服务未开启

今天重装了一下windows系统,然后打开本地网页的时候发现报错啦,定眼一看,右下角的wampserver图标已经变成了红色,并提示WAMP Server - 1/3 services running......表示三个服务中有两个在运行,二个服务已停止。退出又重新打开了wampserver,结果越来越离谱,已经显示All Services are stopped-->Tools-->Check state of services三个服务全部都停了。然后根据提示右键wampserver小图标-->Tools-->Check state of services,得到以下错误提示信息

State of services:

The service 'wampapache64' is not RUNNING nor STOPPED.
[SC] EnumQueryServicesStatus:OpenService failure(s) 1060 :
The specified service does not exist as an installed service.
********* The service 'wampapache64' does not exist ********

The service 'wampmysqld64' is not RUNNING nor STOPPED.
[SC] EnumQueryServicesStatus:OpenService failure(s) 1060 :
The specified service does not exist as an installed service.
********* The service 'wampmysqld64' does not exist ********

The service 'wampmariadb64' is not RUNNING nor STOPPED.
[SC] EnumQueryServicesStatus:OpenService failure(s) 1060 :
The specified service does not exist as an installed service.
********* The service 'wampmariadb64' does not exist ********

WampServer (Apache, PHP and MySQL) will not function properly if any service
'wampapache64'
'wampmysqld64'
'wampmariadb64'
is not started.

all services BINARY_PATH_NAME are OK
all services START_TYPE are OK

--- Do you want to copy the results into Clipboard?
--- Press the Y key to confirm - Press ENTER to continue...

大概意思就是,从你给出的错误信息可知,WampServer 所需的服务(如 Apache、MySQL、MariaDB)并未作为已安装服务存在于系统中,这才致使 WampServer 无法正常运行。

2、 重新安装 WampServer

这是我最先想到的答案,先给原来的数据都做好备份哦~!再卸载当前的 WampServer,接着从官方渠道下载最新版本,然后重新进行安装。在安装过程中,要留意安装路径是否存在中文或者特殊字符,建议将其安装在默认路径(,默认C盘,我装在D盘,例如 D:\wamp64)

但是这种方法我没有用,我的本地网站里有很多信息,也懒得备份,我不太确定我重装之后,我的本地数据还有没有,经过深思熟虑之后,决定采用第二种方法。

3、手动注册服务

你可以尝试手动注册这些服务。以管理员身份打开命令提示符(右键单击开始菜单——>windows Powershell管理员A),然后分别执行以下命令:

cd D:\wamp64\bin\apache\apache{version}\bin

httpd -k install -n "wampapache64" 或者 .\httpd -k install -n "wampapache64"

        cd D:\wamp64\bin\mysql\mysql{version}\bin

mysqld --install wampmysqld64 或者 ./mysqld --install wampmysqld64

cd D:\wamp64\bin\mariadb\mariadb{version}\bin

mariadbd --install wampmariadb64 或者 .\mariadbd --install wampmariadb64

注意,因为我的wamp安装在D盘根目录下,具体视自己的wamp所在位置而定; 这里的 {version} 需要替换成你实际安装的版本号

待全部安装完成后,我的WampServer服务显示All services running,全部开启成功,浏览器输入localhost又可以正常访问啦~!今天的笔记就做完啦,以后遇到同样的问题就可以拿出来看一看~!

打赏

 

发表评论:


返回顶部