在 Windows 上执行另一个 xampp 版本

在 Windows 上执行另一个 xampp 版本

我在windows10上安装了xampp7.2.6到D:\xampp,又安装了xampp5.6.12到D:\xampp5612,点击启动xampp5 apache时,xampp7 apache会启动。

在此处输入图片描述

当我在单击任何内容之前执行 xampp5612/xampp-xontrol.exe 时,日志显示以下错误。

Apache Service detected with wrong path
Change XAMPP Apache and Control Panel settings or
Uninstall/disable the other service manually first
Found Path: "D:\xampp\apache\bin\httpd.exe" -k runservice
Expected Path: "d:\xampp5612\apache\bin\httpd.exe" -k runservice
Problem detected!
Port 80 in use by ""D:\xampp\apache\bin\httpd.exe" -k runservice" with PID 10428!
Apache WILL NOT start without the configured ports free!
You need to uninstall/disable/reconfigure the blocking application
or reconfigure Apache and the Control Panel to listen on a different port
Problem detected!
Port 443 in use by ""D:\xampp\apache\bin\httpd.exe" -k runservice" with PID 10428!
Apache WILL NOT start without the configured ports free!
You need to uninstall/disable/reconfigure the blocking application
or reconfigure Apache and the Control Panel to listen on a different port
 MySQL Service detected with wrong path
Change XAMPP MySQL and Control Panel settings or
Uninstall/disable the other service manually first
Found Path: D:\xampp\mysql\bin\mysqld.exe --defaults-file=d:\xampp\mysql\bin\my.ini mysql
Expected Path: d:\xampp5612\mysql\bin\mysqld.exe --defaults-file=d:\xampp5612\mysql\bin\my.ini mysql

我该如何修复“找到路径”以启动 xampp5.6.12?

答案1

解决此问题的简单方法是手动启动 Apache。apache_start.bat例如,查找名为 的文件D:\xampp5612

如果该文件不存在,那么您可以.bat自己创建一个适当的文件:

前任。apache_start.bat(xampp)

@echo off
echo Please close this command only for Shutdown
echo Apache 2 is starting ...

D:\xampp5612\apache\bin\httpd.exe

if errorlevel 255 goto finish
if errorlevel 1 goto error
goto finish

:error
echo.
echo Apache could not be started
pause

:finish

此批处理文件直接取自 XAMPP,仅做了少量改动。 重要部分是指定httpd.exe(Apache) 的正确路径。


请注意,只要您希望 Apache 运行,您就需要保持此批处理文件生成的命令窗口打开(即关闭窗口将关闭 Apache)。当然,您可以将其最小化而不会出现问题(根据需要)。

相关内容