Apache 2.4.3(带有 XAMPP 1.8.1)未在 Windows 8 中启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13339850/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 10:03:23  来源:igfitidea点击:

Apache 2.4.3 (with XAMPP 1.8.1) not starting in windows 8

windowsapachexamppport

提问by Ishan Dhingra

Just got XAMPP 1.8.1 installed on my Windows 8 PC, this version includes packages mentioned below:

刚刚在我的 Windows 8 PC 上安装了 XAMPP 1.8.1,这个版本包括下面提到的包:

Apache 2.4.3
MySQL 5.5.27
PHP 5.4.7
phpMyAdmin 3.5.2.2
FileZilla FTP Server 0.9.41
Tomcat 7.0.30 (with mod_proxy_ajp as connector)
Strawberry Perl 5.16.1.1 Portable
XAMPP Control Panel 3.1.0 (from hackattack142)

When I launched and tried to start Apache, it gave following error:

当我启动并尝试启动 Apache 时,它​​给出了以下错误:

12:04:41 PM  [Apache]   Attempting to start Apache app...
12:04:41 PM  [Apache]   Status change detected: running
12:04:42 PM  [Apache]   Status change detected: stopped
12:04:42 PM  [Apache]   Error: Apache shutdown unexpectedly.
12:04:42 PM  [Apache]   This may be due to a blocked port, missing dependencies, 
12:04:42 PM  [Apache]   improper privileges, a crash, or a shutdown by another method.
12:04:42 PM  [Apache]   Check the "/xampp/apache/logs/error.log" file
12:04:42 PM  [Apache]   and the Windows Event Viewer for more clues

After that I checked error.log, it was empty so no help from there.

之后我检查了error.log,它是空的,所以没有帮助。

回答by Ishan Dhingra

So here is the solution for this:

所以这里是这个解决方案:

I check port 80used by Skype, after that I changes port to 81and also along with that somewhere i read this error may be because of SSL Port then I changed SSL port to 444. However this got resolved easily.

我检查口80由Skype使用的,在那之后我改变了口81,也伴随着冥冥中我读这个错误可能是因为SSL端口的话,我改变了SSL端口444。然而,这很容易解决。

One most important thing to notice here, all the port changes should be done inside config files, for http port change: httpd.conffor SSL httpd-ssl.conf. Otherwise changes will not replicate to Apache, Sometime PC reboot is also required.

这里要注意的一件最重要的事情是,所有端口更改都应该在配置文件中完成,对于 http 端口更改:httpd.conf用于 SSL httpd-ssl.conf。否则更改将不会复制到 Apache,有时还需要重新启动 PC。

Edit: Make Apache use port 80 and make Skype communicate on other Port

编辑:让 Apache 使用端口 80 并让 Skype 在其他端口上进行通信

For those who are struggling with Skype, want to change its port and to make Apache to use port 80.

对于那些在 Skype 上苦苦挣扎的人,想要更改其端口并使 Apache 使用端口 80。

No need to Re-Install, Here is simply how to change Skype Port

无需重新安装,这里是简单的如何更改Skype端口

Goto: Tools > Options > Advanced > Connection

There you need to uncheckUse port 80 and 443 as alternative for incoming connections.

在那里您需要uncheck使用端口 80 和 443 作为传入连接的替代。

That's it, here is screen shot of it.

就是这样,这是它的屏幕截图。

Changing Skype Port

更改 Skype 端口

回答by Amr H. Abd Elmajeed

I had the exact same error.

我有完全相同的错误。

It was because i didn't run setup_xampp.bat

那是因为我没有运行 setup_xampp.bat

This is a better solution than going through config files and changing ports.

这是比通过配置文件和更改端口更好的解决方案。

回答by Pupil

This problem may occur due to apache not getting required port (default is 80).

这个问题可能是因为 apache 没有得到所需的端口(默认是80)。

The port may be being used by other services.

该端口可能正被其他服务使用。

For example: Skype also has default port 80.

例如:Skype 也有默认端口80

Installing Skype and Apache both on same machine will cause conflict and hence Apache will not start.

在同一台机器上安装 Skype 和 Apache 会导致冲突,因此 Apache 将无法启动。

Either, you change Skype port or change Apache port as described in following steps:

您可以按照以下步骤更改 Skype 端口或更改 Apache 端口:

Change the ports of Apache and it will work for you. Go to httpd.conf

更改 Apache 的端口,它将为您工作。转到 httpd.conf

How to change port for Apache:

如何更改Apache的端口:

Search for:

搜索:

ServerName localhost:80

服务器名称本地主机:80

Change it to:

将其更改为:

ServerName localhost:81

服务器名称本地主机:81

Also Search For:

还搜索:

Listen 80

听 80

Change it to:

将其更改为:

Listen 81

听81

If you have created any virtual hosts, change the ports there also. Then restart your apache.

如果您创建了任何虚拟主机,也请更改那里的端口。然后重启你的apache。

回答by Reza M.A

I had the same problem, but I understand the VMware serviceis the problem. VMware host service and Apache service conflict together.

我遇到了同样的问题,但我知道VMware 服务是问题所在。VMware 主机服务和 Apache 服务同时发生冲突。

To Solve it? Run your task manager ? in services tab find VMwareHostd ? then right click and stop it ? every thing have been solved.

解决它?运行你的任务管理器?在服务选项卡中找到 VMwareHostd 吗?然后右键单击并停止它?一切都已经解决了。

回答by Mihai

Enter services.msc and shutdown anything SQL you have running. The SQL server might be taking over the port.

输入 services.msc 并关闭您正在运行的任何 SQL。SQL 服务器可能正在接管该端口。

回答by Al-Kathiri Khalid

I had the same problem and error, I tried changing the ports for http port from 80 to 81 and ssl port from 443 to 444 but still received the same error so I reverted the ports to default and ran setup_xampp.batwhich solve the problem in seconds.

我遇到了同样的问题和错误,我尝试将 http 端口的端口从 80 更改为 81,将 ssl 端口从 443 更改为 444,但仍然收到相同的错误,因此我将端口恢复为默认值并运行 setup_xampp.bat解决了问题秒。

回答by OmidS

Skype is usually the culprit because it uses port 80 by default. Just close it or uncheck "Use port 80 and 443 as alternatives for incoming connections" under tools > options... > advanced > connection and then restart Skype.

Skype 通常是罪魁祸首,因为它默认使用端口 80。只需关闭它或取消选中工具 > 选项... > 高级 > 连接下的“使用端口 80 和 443 作为传入连接的替代选项”,然后重新启动 Skype。

回答by user2131624

I had to manually edit the 2 text files (httpd.conf and httpd-ssl.conf) using the Config button for Apache to run and change in notepad from 80 > 81 and 443 > 444

我必须使用 Apache 的配置按钮手动编辑 2 个文本文件(httpd.conf 和 httpd-ssl.conf),以便在记事本中运行和更改 80 > 81 和 443 > 444

Using the Xampp UI config manager doesn't save the changes into Apache.

使用 Xampp UI 配置管理器不会将更改保存到 Apache。

回答by user2221456

change 80 to 81 and 443 to 444 by clicking config button and editing httpd.conf and httpd-ssl.congf. Now you can Access XAMPP from 127.0.0.1:81

通过单击配置按钮并编辑 httpd.conf 和 httpd-ssl.congf,将 80 更改为 81,将 443 更改为 444。现在您可以从 127.0.0.1:81 访问 XAMPP

回答by got2code

An error in your httpd.conf or other Apache config files will cause this. Revert httpd.conf et alto the pristine, installer versions and see if Apache runs again.

您的 httpd.conf 或其他 Apache 配置文件中的错误将导致此问题。将 httpd.conf恢复到原始的安装程序版本,看看 Apache 是否再次运行。

(I tried Skype and other suggestions here, no luck, but logs [XAMPP > Apache > Logs button] showed that it ran once when first installed. That was the giveaway.)

(我在这里尝试了 Skype 和其他建议,但没有运气,但日志 [XAMPP > Apache > 日志按钮] 显示它在第一次安装时运行了一次。那是赠品。)

Likely errors:

可能的错误:

  • Did you edit with a Windows text editor that changes line endings to non-Unix? (Solution here.)
  • Missing or invalid DSO files (.so)
  • 您是否使用将行尾更改为非 Unix 的 Windows 文本编辑器进行编辑?(这里的解决方案。)
  • 丢失或无效的 DSO 文件 (.so)