Apache、MySQL 和 FTP 在 Win7 上使用 XAMPP“检测到错误路径”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12026931/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apache, MySQL, and FTP 'Detected With Wrong Path' using XAMPP on Win7
提问by Pawna
I'm having the following issues when trying to access XAMPP on my Win7. They are configured to start automatically when the OS is loaded. and the following message are what I see
尝试在我的 Win7 上访问 XAMPP 时遇到以下问题。它们被配置为在加载操作系统时自动启动。以下消息是我所看到的
6:25:17 AM [apache] Apache Service Detected With Wrong Path
6:25:17 AM [apache] Uninstall the service manually first
6:25:17 AM [mysql] MySQL Service Detected With Wrong Path
6:25:17 AM [mysql] Uninstall the service manually first
6:25:17 AM [filezilla] FileZilla Service Detected With wrong Path
6:25:17 AM [filezilla] Uninstall the service manually first
6:25:17 AM [apache] Apache 服务检测到错误路径
6:25:17 AM [apache] 首先手动卸载服务
6:25:17 AM [mysql] MySQL 服务检测到错误路径
6:25:17 AM [mysql] 先手动卸载服务
6:25:17 AM [filezilla] FileZilla Service Detected With wrong Path
6:25:17 AM [filezilla] 先手动卸载服务
And the Apache error log is as follows:
并且Apache错误日志如下:
[Sun Aug 19 06:24:16.719046 2012] [ssl:warn] [pid 1516:tid 384] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Aug 19 06:24:20.493262 2012] [mpm_winnt:notice] [pid 1516:tid 384] AH00455: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 configured -- resuming normal operations
[Sun Aug 19 06:24:20.494262 2012] [mpm_winnt:notice] [pid 1516:tid 384] AH00456: Server built: May 13 2012 14:10:15
[Sun Aug 19 06:24:20.494262 2012] [core:notice] [pid 1516:tid 384] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Sun Aug 19 06:24:20.496262 2012] [mpm_winnt:notice] [pid 1516:tid 384] AH00418: Parent: Created child process 324
[Sun Aug 19 06:24:22.116354 2012] [ssl:warn] [pid 324:tid 288] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Aug 19 06:24:22.174358 2012] [mpm_winnt:notice] [pid 324:tid 288] AH00354: Child: Starting 150 worker threads.
[Sun Aug 19 06:24:16.719046 2012] [ssl:warn] [pid 1516:tid 384] AH01873:Init:会话缓存未配置 [提示:SSLSessionCache]
[Sun Aug 19 06:24:22.42932nt] :notice] [pid 1516:tid 384] AH00455: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 配置 - 恢复正常操作
[Sun Aug 19 06:24:20.494262 2012]: [mpm_winnt notice] [pid 1516:tid 384] AH00456:服务器构建时间:2012 年 5 月 13 日 14:10:15
[Sun Aug 19 06:24:20.494262 2012] [core:notice] [pid 1516:tid 3804] 命令行:AH0 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Sun Aug 19 06:24:20.496262 2012] [mpm_winnt:notice] [pid 1516:tid 384] AH00418:父:已创建子进程 324
[Sun Aug 19 06:24:22.116354 2012] [ssl:warn] [pid 324:tid 288] AH01873:Init:会话缓存未配置 [提示:SSLSessionCache]
[Sun Aug 19 06:24:22.1204358 ] [pid 324:tid 288] :notice] [pid 324:tid 288] AH00354: Child: 启动 150 个工作线程。
And the MySQL error log
和 MySQL 错误日志
120819 6:24:18 [Note] Plugin 'FEDERATED' is disabled.
120819 6:24:19 InnoDB: The InnoDB memory heap is disabled
120819 6:24:19 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120819 6:24:19 InnoDB: Compressed tables use zlib 1.2.3
120819 6:24:19 InnoDB: Initializing buffer pool, size = 16.0M
120819 6:24:19 InnoDB: Completed initialization of buffer pool
120819 6:24:19 InnoDB: highest supported file format is Barracuda.
120819 6:24:21 InnoDB: Waiting for the background threads to start
120819 6:24:22 InnoDB: 1.1.8 started; log sequence number 4011253
120819 6:24:22 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
120819 6:24:22 [Note] - '0.0.0.0' resolves to '0.0.0.0';
120819 6:24:22 [Note] Server socket created on IP: '0.0.0.0'.
120819 6:24:27 [Note] Event Scheduler: Loaded 0 events
120819 6:24:27 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.25a' socket: '' port: 3306 MySQL Community Server (GPL)
120819 6:24:18 [注意] 插件“联邦”被禁用。
120819 6:24:19 InnoDB:InnoDB 内存堆被禁用
120819 6:24:19 InnoDB:互斥锁和 rw_locks 使用 Windows 互锁函数
120819 6:24:19 InnoDB:压缩表使用 zlib2:024:16:
2 InnoDB:初始化缓冲池,大小 = 16.0M
120819 6:24:19 InnoDB:缓冲池初始化完成
120819 6:24:19 InnoDB:支持的最高文件格式为 Barracuda。
120819 6:24:21 InnoDB:等待后台线程启动
120819 6:24:22 InnoDB:1.1.8 启动;日志序列号 4011253
120819 6:24:22 [注意] 服务器主机名(绑定地址):'0.0.0.0';端口:3306
120819 6:24:22 [注意] - “0.0.0.0”解析为“0.0.0.0”;
120819 6:24:22 [注意] 在 IP 上创建的服务器套接字:'0.0.0.0'。
120819 6:24:27 [注意] 事件调度程序:加载 0 个事件
120819 6:24:27 [注意] c:\xampp\mysql\bin\mysqld.exe:准备连接。
版本:'5.5.25a' 套接字:'' 端口:3306 MySQL 社区服务器 (GPL)
Btw, editing is kind of hard here, having to do <br /> at every line
顺便说一句,这里的编辑有点困难,必须在每一行都做 <br />
回答by Sarang
What that error message is indicating is that you have a MySQL Windows Service installed that is not part of the current XAMPP you are using (it detects the services by name then validates the service path). You indicated that you uninstalled a previous external MySQL installation. If this is the only other installation you are aware of on your system, it may not have automatically removed the service from Windows Services when it uninstalled.
该错误消息表明您安装了一个 MySQL Windows 服务,该服务不是您正在使用的当前 XAMPP 的一部分(它按名称检测服务,然后验证服务路径)。您表示您卸载了以前的外部 MySQL 安装。如果这是您在系统上唯一知道的其他安装,则在卸载该服务时,它可能不会自动从 Windows 服务中删除该服务。
If this is the case, you can do the following:
如果是这种情况,您可以执行以下操作:
- Open a command prompt (Start > Run > cmd) run as administrator
Type the following:
Code: Select all sc delete mysql
and hit return. (Note: this requires admin privileges.)
- 打开命令提示符(开始 > 运行 > cmd)以管理员身份运行
键入以下内容:
Code: Select all sc delete mysql
并点击返回。(注意:这需要管理员权限。)
If the second step completes successfully, you should be able to reopen the control panel and see what it then says. If all is well, you can install the MySQL Window Service for the XAMPP MySQL by clicking the red 'X' in the control panel that should be next to MySQL if all went well.
如果第二步成功完成,您应该能够重新打开控制面板并查看它的内容。如果一切顺利,您可以通过单击 MySQL 旁边的控制面板中的红色“X”为 XAMPP MySQL 安装 MySQL Window Service。
回答by Amreesh Tyagi
Just uncheck and check button in Module Services column. It will automatically delete old service and start new service with new path. It happens when you delete xampp folder directly without stopping services.
只需取消选中并选中模块服务列中的按钮。它将自动删除旧服务并以新路径启动新服务。当您在不停止服务的情况下直接删除 xampp 文件夹时会发生这种情况。
回答by gillenpj
This answer is intended to supplement the one from Sarang. I just want to make clear, because it wasn't obvious to me, that it's possible to have an existing installation of MySQL and one tied to XAMPP running simultaneously. Here's how, along the same lines as Sarang's answer but hopefully with detail that provides extra useful guidance:
这个答案旨在补充来自 Sarang 的答案。我只是想说明一下,因为这对我来说并不明显,可以同时运行一个现有的 MySQL 安装和一个与 XAMPP 相关的安装。以下是方法,与 Sarang 的答案相同,但希望提供更多有用的指导的详细信息:
- Run XAMPP Control Panel as administrator
- Click MySQL/Config and change port to 3307 in two places
- Stop MySQL service for existing installation
- Run cmd.exe as administrator. Type "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin"-u root -p shutdown. This will stop service for existing installation of MySQL
- Back in XAMPP Control Panel, click on green check-mark next to MySQL: this will delete service for existing installation of MySQL
- Click XAMPP Control Panel/Config and configure as below
- 以管理员身份运行 XAMPP 控制面板
- 单击 MySQL/Config 并在两个地方将端口更改为 3307
- 为现有安装停止 MySQL 服务
- 以管理员身份运行 cmd.exe。输入“C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin”-u root -p shutdown。这将停止现有 MySQL 安装的服务
- 返回 XAMPP 控制面板,单击 MySQL 旁边的绿色复选标记:这将删除现有 MySQL 安装的服务
- 点击 XAMPP Control Panel/Config 并配置如下
- Click Service and Port Settings and change port for MySQL to 3307 (I'm not sure if this is really necessary)
- Quit XAMPP run again as administrator. This will start up Apache and MySql services
- Run cmd.exe as administrator. Type "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --install. This will reinstall service for existing installation of MySQL
- Open up Window Services. Start service for existing installation of MySQL
- 单击服务和端口设置并将 MySQL 的端口更改为 3307(我不确定这是否真的有必要)
- 退出 XAMPP 再次以管理员身份运行。这将启动 Apache 和 MySql 服务
- 以管理员身份运行 cmd.exe。键入“C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld”--安装。这将为现有的 MySQL 安装重新安装服务
- 打开窗口服务。为现有的 MySQL 安装启动服务
回答by Manoj Selvin
this is because you had installed apache seperately apart from the xampp apache..... no worries..... try the below steps it will resolve your issue
这是因为您除了 xampp apache 之外,还单独安装了 apache..... 不用担心..... 尝试以下步骤它将解决您的问题
open cmd > run as administrator type the following commands
打开cmd>以管理员身份运行,输入以下命令
httpd -k shutdown
httpd -k stop
httpd -k uninstall
or open powershell> run as administrator type the following commands
或打开 powershell> 以管理员身份运行,输入以下命令
.\httpd -k shutdown
.\httpd -k stop
.\httpd -k uninstall
or
或者
win + R
type services.msc
then find Apache24 or httpd
now open cmd > run as administrator
type sc delete "<your services name from the list for apache>"
thanks to the sources and contributors :)
感谢来源和贡献者:)
回答by DrJonOsterman
I was able to get it to workaround this by running as administrator.
我能够通过以管理员身份运行来解决这个问题。
回答by gavin
Try looking at this post, it is very similar and it helped me fix my problems (delete previous installations of apache and mysql)
试试看这个帖子,它非常相似,它帮助我解决了我的问题(删除以前安装的 apache 和 mysql)
回答by Aamir Kalimi
Go to Command Promptand Open it as a Administrator
转到命令提示符并以管理员身份打开它
just type
只需输入
sc delete MySQL
and then
进而
sc delete Apache2.4
Close the XAMPP and open it again.
关闭 XAMPP 并再次打开它。