启动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正常运行。