php WampServer 橙色图标

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

WampServer orange icon

phpapachewampwampserver

提问by Jethro

I am having problems with Wamp Server, the icon will never turn green. It is constantly stuck at orange.

我在使用 Wamp Server 时遇到问题,图标永远不会变绿。它一直停留在橙色。

I have tried many ways, editing HOSTS file, .config files, disabling IIS, changing SKYPE's port, quitting SKYPE, disabling World Wide Web publishing services etc... And under wamp server icon > Apache > Test port 80, it states that Apache is using that port.

我尝试了很多方法,编辑 HOSTS 文件、.config 文件、禁用 IIS、更改 SKYPE 的端口、退出 SKYPE、禁用万维网发布服务等......在 wamp 服务器图标 > Apache > 测试端口 80 下,它指出 Apache正在使用该端口。

I am running Windows 8 64 bit and Wamp Server 2.4. Any help would be appreciated.

我正在运行 Windows 8 64 位和 Wamp Server 2.4。任何帮助,将不胜感激。

回答by RiggsFolly

Before you can fix anything you need to know which service has not started, Apache or MySQL.

在修复任何问题之前,您需要知道哪个服务尚未启动,Apache 还是 MySQL。

As the TEST PORT 80 utility is saying Apache is running its probably the MySQL service that has not started. Unless you have another Apache running!

由于 TEST PORT 80 实用程序说 Apache 正在运行其可能尚未启动的 MySQL 服务。除非你有另一个 Apache 正在运行!

So which service has not started???

那么哪个服务没有启动???

If the wampmanager icon is not GREEN then one of the services ( Apache/MySQL ) has not started properly.

如果 wampmanager 图标不是绿色,则其中一项服务 (Apache/MySQL) 未正确启动。

How to tell which service is not running if the wampmanager icon is orange.

如果 wampmanager 图标为橙色,如何判断哪个服务没有运行。

Left click the wampmanager icon to reveal the menu-> Apache -> Service If the Start/Resume servicemenu is Green then Apache IS NOTrunning.

左键点击wampmanager图标显示菜单- >阿帕奇- >服务如果开始/恢复服务菜单绿色然后阿帕奇IS NOT运行。

Left click the wampmanager icon to reveal the menu-> MySQL -> Service If the Start/Resume servicemenu is Green then MySQL IS NOTrunning.

左键点击wampmanager图标显示菜单- > MySQL的- >服务如果开始/恢复服务菜单是绿色那么MySQL IS NOT运行。

If Apache is the service that is not running it is normally, but not always, because something else has captured port 80.

如果 Apache 是未运行的服务,则它通常但并非总是如此,因为其他东西已捕获端口 80。

Now do, Left click the wampmanager icon to reveal the menu-> Apache -> Service -> Test port 80 This will launch a command window and display some information about what, if anything is using port 80.

现在做,左键单击 wampmanager 图标以显示菜单 -> Apache -> 服务 -> 测试端口 80 这将启动一个命令窗口并显示一些有关使用端口 80 的信息(如果有的话)。

Whatever it is should be re-configured to not use port 80 or uninstalled if you are not using it.

无论它是什么,都应该重新配置为不使用端口 80,或者如果您不使用它,则将其卸载。

If port 80 is not the problem look for errors in the appropriate error log ( use the wamp manager menus to view the error logs )

如果端口 80 不是问题,请在相应的错误日志中查找错误(使用 wamp 管理器菜单查看错误日志)

If these do not exists or show no errors then also check the Windows Event Viewer Start -> Administrative Tools -> Event Viewer And look in the 'Windows Logs' -> Application' section accessed from the menu on the left of the dialog for error messages from Apache and or MySQL.

如果这些不存在或没有显示错误,那么还要检查 Windows 事件查看器开始 -> 管理工具 -> 事件查看器并查看从对话框左侧菜单访问的“Windows 日志”-> 应用程序部分是否有错误来自 Apache 和/或 MySQL 的消息。

If its MYSQL that has not started.

如果它的 MYSQL 还没有启动。

Check the mysql error log by using the menus

使用菜单检查mysql错误日志

wampmanager->MySQL->error log

Check the Windows Event log for messages from MYSQL

检查 Windows 事件日志中是否有来自 MYSQL 的消息

Check you dont have another MYSQL Server instance running.

检查您没有运行另一个 MYSQL Server 实例。

How to Configure SKYPE so it does not require port 80 or 443

如何配置 SKYPE 使其不需要端口 80 或 443

Run SKYPE then using the menus do this: Tools -> Options -> Advanced -> Connection Un-Check the checkbox next to 'Use port 80 and 443 as alternatives for incomming connections' Now restart SKYPE for these changes to take effect.

运行 SKYPE,然后使用菜单执行以下操作:工具 -> 选项 -> 高级 -> 连接取消选中“使用端口 80 和 443 作为传入连接的替代选项”旁边的复选框 现在重新启动 SKYPE 以使这些更改生效。

If you are running Windows 8 SKYPE comes as an app and this cannot ( as yet ) be configured in this way. However if you uninstall the SKYPE app and install SKYPE in the old way, you can reconfigure it, and it works just as well.

如果您运行的是 Windows 8 SKYPE,则 SKYPE 是作为应用程序提供的,并且(目前)还不能以这种方式进行配置。但是,如果您卸载 SKYPE 应用程序并以旧方式安装 SKYPE,您可以重新配置它,它也能正常工作。

回答by elektrykalAJ

To add to the above post^^:

添加到上面的帖子^^:

If either of the services are not running, it might simply just be because they need to be installed/configured. This is easy to do straight from the WampManager Icon.

如果其中一个服务没有运行,可能只是因为它们需要安装/配置。这很容易直接从 WampManager 图标完成。



如果 ApacheApache没有运行:

 WampManager Icon -> Apache -> Service -> Install Service

You should get a command prompt pop-up if port 80 is free (if not, see above post):

如果端口 80 空闲,您应该会收到一个命令提示符弹出窗口(如果没有,请参阅上面的帖子):

      'Your port 80 is available. Install will proceed.

       Press Enter to continue...'



如果 MySQLMySQL没有运行:

WampManager Icon -> MySQL -> Service -> Install Service



对一项或两项服务执行此操作,然后:

WampManager Icon -> Restart All Services

The icon should now turn green :)

图标现在应该变成绿色:)

回答by SteveW

I ran into this same problem this morning but none of the answers above provided me with the solution.

今天早上我遇到了同样的问题,但上面的答案都没有为我提供解决方案。

I realised eventually that my issue was because I had changed the DocumentRoot to a subfolder of the www directory, as I had previously been running a Symfony2 project inside www.

我最终意识到我的问题是因为我已将 DocumentRoot 更改为 www 目录的子文件夹,因为我之前一直在 www 中运行 Symfony2 项目。

With the new project I am working on inside www, that old DocumentRoot dir did not exist any more so Apache failed to start.

对于我在 www 内部工作的新项目,旧的 DocumentRoot 目录不再存在,因此 Apache 无法启动。

wampserver -> Apache -> httpd.conf, then look for "DocumentRoot" and make sure the directory it points to exists or else change it to one that does.

wampserver -> Apache -> httpd.conf,然后查找“DocumentRoot”并确保它指向的目录存在,否则将其更改为存在的目录。

Thank you to RiggsFolly, it was because of your hint about the Event Viewer above that I found the issue.

感谢 RiggsFolly,正是因为你对上面事件查看器的提示,我才发现了这个问题。

回答by NickUnuchek

Wamp server default disk is "C:\"if you install it to another disk for ex G:\: go to

Wamp服务器默认磁盘是"C:\"如果您将其安装到另一个磁盘例如G:\:转到

  1. g:\wamp\bin\apache\apache2.4.9\bin\
  1. g:\wamp\bin\apache\apache2.4.9\bin\

2 .call cmd

2 .call cmd

3 .execute httpd.exe -t

3.执行 httpd.exe -t

you will see errors

你会看到错误

enter image description here

enter image description here

  1. go to g:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-autoindex.conf

  2. change in line 23 to :

  1. g:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-autoindex.conf

  2. 将第 23 行更改为:

Alias /icons/ "g:/Apache24/icons/"

Alias /icons/ "g:/Apache24/icons/"

<Directory "g:/Apache24/icons">
    Options Indexes MultiViews
    AllowOverride None
    Require all granted
</Directory>
  1. Restart All services. Done. Resolved
  1. 重启所有服务。完毕。解决

回答by Andrew

If you are using wampserver 3 (recommended, works with no configuration usually)

如果您使用的是 wampserver 3(推荐,通常无需配置即可使用)

  • click wampserver icon > apache > service administration > install service
  • click wampserver icon > mysql > service administration > install service
  • click wampserver icon > mariadb > service administration > install service
  • click wampserver icon > restart all services
  • 单击 wampserver 图标 > apache > 服务管理 > 安装服务
  • 单击 wampserver 图标 > mysql > 服务管理 > 安装服务
  • 单击 wampserver 图标 > mariadb > 服务管理 > 安装服务
  • 单击 wampserver 图标 > 重新启动所有服务

if this doesnt fix it, try:

如果这不能解决它,请尝试:

  • right click wampserver icon > Tools > Check httpd.conf syntax (then fix the issue it identifies and restart all services, likely it's bad syntax in your virtual hosts file)

  • right click wampserver icon > Tools > test port 80 (you likely have skype turned on or something else, turn it off and restart all services)

  • 右键单击 wampserver 图标 > 工具 > 检查 httpd.conf 语法(然后修复它识别的问题并重新启动所有服务,这可能是您的虚拟主机文件中的错误语法)

  • 右键单击 wampserver 图标 > 工具 > 测试端口 80(您可能打开了 Skype 或其他东西,将其关闭并重新启动所有服务)

If this doesnt fix it, maybe have a windows conflict:

如果这不能解决它,则可能是 Windows 冲突:

If this doesnt fix it:

如果这不能解决它:

  • right click wampserver icon > tools
    • check all of those for clues
  • 右键单击 wampserver 图标 > 工具
    • 检查所有这些线索

回答by Mr. Garrison

PLEASE NOTE! If you have gone through all of the above, like "I" did, and still get the Orange icon, and, when you test Port 80 you get "Apache", look at the file: c:/wamp/bin/apache/apache2.4.9/conf/httpd.conf (your apache version number may differ).

请注意!如果您已经完成了上述所有操作,如“我”所做的那样,仍然得到橙色图标,并且,当您测试端口 80 时,您会得到“Apache”,请查看文件:c:/wamp/bin/apache/ apache2.4.9/conf/httpd.conf(您的 apache 版本号可能不同)。

In the file, about line # 62, you'll find a note saying to fill in this:

在文件中,关于第 62 行,你会发现一个注释说要填写:

Listen 0.0.0.0:80 Listen [::0]:80

听 0.0.0.0:80 听 [::0]:80

Why?

为什么?

Change this to Listen on specific IP addresses as shown below to prevent Apache from glomming onto all bound IP addresses.

将其更改为侦听特定 IP 地址,如下所示,以防止 Apache 进入所有绑定的 IP 地址。

I changed that to match my localhost IP address and when I restarted Wamp, it quickly went from Red to Green. Success!...3 hours later....

我更改了它以匹配我的本地主机 IP 地址,当我重新启动 Wamp 时,它很快从红色变为绿色。成功!...3 小时后....

回答by user3050538

After removing the innodb_additional_mem_pool_size=4M from my.ini and killing that process that used the port that Mysql wanted I managed it to go.

从 my.ini 中删除 innodb_additional_mem_pool_size=4M 并杀死使用 Mysql 想要的端口的进程后,我设法让它去。

Suggested fix: 1) The quick solution: Comment the line innodb_additional_mem_pool_size=4M in the service's 'my.ini' file, 2) exclude the option from the 5.7.4 default config file or 3) un-unknow the variable to mysql ;)

建议修复:1) 快速解决方案:在服务的“my.ini”文件中注释 innodb_additional_mem_pool_size=4M 行,2) 从 5.7.4 默认配置文件中排除该选项或 3) 不知道 mysql 的变量;)

link: http://bugs.mysql.com/bug.php?id=72533

链接:http: //bugs.mysql.com/bug.php?id=72533

Use number 1, remove the whole line. Save to my.ini. Kill the process if you have one running (look at them with resmon.exe and kill them with command taskkill /pid pid-of-process /f), then start wampmysql and your icon should turn green.

使用数字 1,删除整行。保存到 my.ini。如果您有一个正在运行的进程(使用 resmon.exe 查看它们并使用命令 taskkill /pid pid-of-process /f 杀死它们),则终止该进程,然后启动 wampmysql,您的图标应变为绿色。

Regards SB

问候SB

回答by Hitesh Sahu

It can happen because of one of the three reasons:-

它可能由于以下三个原因之一而发生:-

1) Missing VC++ installation:Install All versions of VC++ redistribution packages VC9, VC10, VC11, VC13, VC14 and VC15. See the link provided at the end for download link. If you have a 64-bit Windows, you must install both 32 and 64bit versions of each VisualC++ package, even if you do not use Wampserver 64 bit.

1)缺少 VC++ 安装:安装所有版本的 VC++ 再分发包 VC9、VC10、VC11、VC13、VC14 和 VC15。下载链接见文末提供的链接。如果您使用的是 64 位 Windows,则即使您不使用 64 位 Wampserver,您也必须安装每个 VisualC++ 包的 32 位和 64 位版本。

2) You forgot to provide Admin Privileges to WAMP Server: Launch and Install with the "Run as administrator"option, very important.

2)您忘记为 WAMP 服务器提供管理员权限:使用“以管理员身份运行”选项启动和安装,这非常重要。

3) WAMP, IIS and Skype fighting over same port:

3) WAMP、IIS 和 Skype 争夺同一个端口

enter image description here

enter image description here

回答by Ram Chandran

Adding to what @Hitesh-sahu said you need all the VC++ redistribution packages for it to turn green. I referred to this threadfrom wampserver forum. You can install this little tool (check_vcredist) from the tools section herewhich will check if all the needed dependencies are installed (see attached image) and it will also provide links to missing ones. If you are using x64 version of Windows like I do and your wampserver does not turn green even after installing all the packages then uninstall and do a fresh installation again. Hope it helps.

加上@Hitesh-sahu 所说的,您需要所有 VC++ 重新分发包才能使其变绿。我从 wampserver 论坛中提到了这个线程。您可以从这里的工具部分安装这个小工具 (check_vcredist),它会检查是否安装了所有需要的依赖项(见附图),并且它还将提供缺少的链接。如果您像我一样使用 x64 版本的 Windows,并且即使在安装所有软件包后您的 wampserver 也没有变绿,请卸载并再次进行全新安装。希望能帮助到你。

enter image description here

enter image description here

回答by user3321557

  • go to C:\wamp\bin\mysql\mysql5.6.17
  • look for "my.ini"; right click to edit it
    • use your favorite editor (notepad++, jedit…)
  • look for 3306and change it to 3307
  • restart all the services and it should work :)
  • 转到 C:\wamp\bin\mysql\mysql5.6.17
  • 寻找“my.ini”;右键单击以编辑它
    • 使用您最喜欢的编辑器(记事本++、jedit...)
  • 寻找3306并将其更改为3307
  • 重新启动所有服务,它应该可以工作:)