XAMPP启动Apache服务时启动失败

9:48:49 [Apache] Apache Service detected with wrong path

9:48:49 [Apache] Change XAMPP Apache and Control Panel settings or

9:48:49 [Apache] Uninstall/disable the other service manually first

9:48:49 [Apache] Found Path: "D:\DownloadSoft\Apache\httpd-2.4.41-o111c-x64-vc15-r2\Apache24\bin\httpd.exe" -k runservice

9:48:49 [Apache] Expected Path: "d:\installsoft\xampp\apache\bin\httpd.exe" -k runservice

9:48:49 [Apache] Problem detected!

9:48:49 [Apache] Port 443 in use by ""D:\DownloadSoft\Apache\httpd-2.4.41-o111c-x64-vc15-r2\Apache24\bin\httpd.exe" -k runservice" with PID 464!

9:48:49 [Apache] Apache WILL NOT start without the configured ports free!

9:48:49 [Apache] You need to uninstall/disable/reconfigure the blocking application

9:48:49 [Apache] or reconfigure Apache and the Control Panel to listen on a different port

9:48:49 [mysql] Problem detected!

9:48:49 [mysql] Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" MySQL57"!

9:48:49 [mysql] MySQL WILL NOT start without the configured ports free!

9:48:49 [mysql] You need to uninstall/disable/reconfigure the blocking application

9:48:49 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port

9:48:49 [Tomcat] Tomcat Service detected with wrong path

9:48:49 [Tomcat] Change XAMPP Tomcat and Control Panel settings or

9:48:49 [Tomcat] Uninstall/disable the other service manually first

9:48:49 [Tomcat] Found Path: "D:\InstallSoft\Apache Software Foundation\Tomcat 7.0\bin\Tomcat7.exe" //RS//Tomcat7

9:48:49 [Tomcat] Expected Path: d:\installsoft\xampp\tomcat\bin\tomcat7.exe //RS//Tomcat7

9:48:49 [main] Starting Check-Timer

9:48:49 [main] Control Panel Ready

9:49:23 [Apache] Problem detected!

9:49:23 [Apache] Port 443 in use by ""D:\DownloadSoft\Apache\httpd-2.4.41-o111c-x64-vc15-r2\Apache24\bin\httpd.exe" -k runservice" with PID 464!

9:49:23 [Apache] Apache WILL NOT start without the configured ports free!

9:49:23 [Apache] You need to uninstall/disable/reconfigure the blocking application

9:49:23 [Apache] or reconfigure Apache and the Control Panel to listen on a different port

9:48:49 [main] Starting Check-Timer

9:48:49 [main] Control Panel Ready

9:49:23 [Apache] Problem detected!

9:49:23 [Apache] Port 443 in use by ""D:\DownloadSoft\Apache\httpd-2.4.41-o111c-x64-vc15-r2\Apache24\bin\httpd.exe" -k runservice" with PID 464!

9:49:23 [Apache] Apache WILL NOT start without the configured ports free!

9:49:23 [Apache] You need to uninstall/disable/reconfigure the blocking application

9:49:23 [Apache] or reconfigure Apache and the Control Panel to listen on a different port

9:49:23 [Apache] Attempting to start Apache service...

9:53:08 [Apache] Status change detected: running

9:53:34 [Apache] Attempting to stop Apache service...

9:53:38 [Apache] Status change detected: stopped

一开始以为是端口占用的问题,后来发现修改了端口也没有用。

解决方法:

1.首先,进入自己的注册表:win+R打开运行对话框;

2.然后,输入regedit回车,进入注册表--->点击HKEY_LOCAL_MACHINE---->SYSTEM---->currentControlSet---->Services---->找到Apache2.4,你就会在右边看到ImagePath,这时候的路径是以前那个版本的路径,选中ImagePath点击右键修改,把xampp里面提示的Expected Path后面的路径粘贴进去,然后确定:

3.最后,重启xampp就可以了。

参考资料:https://jingyan.baidu.com/article/fd8044fa3611eb5031137a1b.html