Wampserver启动出错

启动Wampserver,出现提示The configuration file contains a syntax error on line 0; [EParseError] No tray icon was specified. Please assign a tray icon by using on the of the Trayicon directoives in the [Config] section.

这时候发现我的wamp安装根目录下wampmanager.ini里是乱码的。

网上浏览了一些解决方法,通过以下方式解决。

覆盖wampmanager.ini内容为:

[Config]
;WAMPCONFIGSTART
ImageList=images_on.bmp
ServiceCheckInterval=1
ServiceGlyphRunning=13
ServiceGlyphPaused=14
ServiceGlyphStopped=15
TrayIconAllRunning=16
TrayIconSomeRunning=17
TrayIconNoneRunning=18

[Services]
Name: wampapache
Name: wampmysqld

[Messages]
AllRunningHint=WAMPSERVER - server Online
SomeRunningHint=WAMPSERVER - server Online
NoneRunningHint=WAMPSERVER - server Online

[StartupAction]
;WAMPSTARTUPACTIONSTART
Action: run; FileName: "C:/wamp/bin/php/php5.3.0/php-win.exe";Parameters: "refresh.php";WorkingDir: "C:/wamp/scripts"; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
;WAMPSTARTUPACTIONEND

根据实际情况修改部分:

Action: run; FileName: "C:/wamp64/bin/php/php5.6.16/php-win.exe";Parameters: "refresh.php";WorkingDir: "C:/wamp64/scripts"; Flags: waituntilterminated

保存,然后再次启动,就可以成功了。

以上亲测有效。

点击小绿图标修改配置,比如修改php版本为7.0.0(安装时安装了5.6.16和7.0.0版本,可以选择切换版本),这时候wampmanager.ini文件会做出相应的自动修改,即wamp正常运行。

你好!对于WampServer中MySQL无法启动的问题,有几个常见的可能原因和解决方法: 1. 端口冲突:请确保WampServer中MySQL所使用的端口(默认是3306)没有被其他程序占用。你可以尝试修改MySQL的端口来解决冲突。在WampServer的系统托盘图标中,选择"MySQL" -> "my.ini",在打开的文件中找到"port="配置项,并将其修改为一个未被占用的端口。 2. 配置文件错误:检查MySQL的配置文件是否存在错误。同样,在WampServer的系统托盘图标中,选择"MySQL" -> "my.ini",查看配置文件中是否存在错误的配置项或语法错误。 3. 数据库文件损坏:如果你的数据库文件损坏了,可能会导致MySQL无法启动。你可以尝试删除MySQL数据文件夹(默认路径为:C:\wamp64\bin\mysql\mysql版本\data),然后重新启动MySQL服务,这将会重新创建一个空的数据库。 4. 服务启动失败:如果MySQL服务无法正常启动,可能是由于其他原因导致的。你可以尝试在命令行中手动启动MySQL服务,打开命令提示符,输入以下命令:`cd C:\wamp64\bin\mysql\mysql版本\bin`(将路径替换为你的安装路径),然后运行`mysqld --console`命令查看是否有任何错误信息输出。 如果以上方法都无法解决问题,建议你检查WampServer的日志文件(路径为:C:\wamp64\bin\apache\apache版本\logs)和MySQL错误日志文件(路径为:C:\wamp64\bin\mysql\mysql版本\data)中的错误信息,以便更进一步地排查问题。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值