gpt4 book ai didi

php - 安装多个 Apache 后 Xampp 中的 Apache 出现问题

转载 作者:可可西里 更新时间:2023-11-01 06:31:07 25 4
gpt4 key购买 nike

一段时间以来,我一直在尝试以一种有效的方式安装 php、apache 和 mySQL。在多次手动尝试并遇到障碍后,我最终只尝试使用 Xampp。

但是,在启动时,程序显示:

2:18:39 PM  [main]  Running with Administrator rights - good!
2:18:39 PM [main] XAMPP Installation Directory: "c:\xampp\"
2:18:39 PM [main] Checking for prerequisites
2:18:39 PM [main] All prerequisites found
2:18:39 PM [main] Initializing Modules
2:18:39 PM [Apache] Apache Service detected with wrong path
2:18:39 PM [Apache] Change XAMPP Apache and Control Panel settings or
2:18:39 PM [Apache] Uninstall/disable the other service manually first
2:18:39 PM [Apache] Found Path: "C:\Apache24\bin\httpd.exe" -k runservice
2:18:39 PM [Apache] Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice

我听从了建议 here , 但是

(a) 将端口 Listen 80 更改为 Listen *:80Listen 81 无效。

(b) 使用 netstat -ao,没有以 80 结尾的本地地址。

我还尝试删除不在 xampp 文件夹中的任何与 apache、mysql 和 php 相关的文件,这些文件是以前安装尝试遗留下来的。

试过 xampp 1.8.2,卸载,试过 1.8.3,同样的问题。

据我所知,我一定是在安装 Xampp 之前在 Xampp 之外的某个地方更改了一些代码,现在它在运行 apache 时执行,改变了 Xampp 想要的路径(预期路径:“c :\xampp\apache\bin\httpd.exe"-k runservice) 到现在删除的文件夹 C:\Apache24\bin 的路径。但是,我不知道这段代码可能在哪里!

我尝试在整个 C 驱动器中搜索 C:\Apache24\bin,但搜索结果为空。

机器:Windows 7 64 位

以前安装/卸载:Apache2.2、Apache2.4、php5.5.4、使用 MySQL Installer 5.6 的 MySQL

试过 xampp for windows 1.8.2

xampp for windows 1.8.3 当前已安装。

有什么帮助吗?

最佳答案

出现这个错误的原因是因为你之前安装过一次Apache并且它的服务还在运行。

如果您使用的是 Windows 7,请单击“开始”并键入“服务”。打开服务并查看是否列出了 Apache。如果是,请双击它以查看其属性。通过选择它复制服务名称(例如 Apache 2.4)-> 右键单击​​ -> 选择复制。

关闭服务窗口。

单击开始并通过键入找到 cmd。右键单击 cmd.exe 并选择“以管理员身份运行”。

当 cmd 窗口打开时,键入此命令并按 Enter 键:

注意:您应该右键单击窗口选择粘贴,而不是 Apache 2.4

sc delete "Apache 2.4"

按回车键后,您应该会收到消息:serviceDelete Success

再次打开服务窗口(我在上面已经解释过了),看看你那里是否又安装了 Apache。

关于php - 安装多个 Apache 后 Xampp 中的 Apache 出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19124599/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com