PHPStudy在启动或重启的时候apache,nginx服务的时候会自动将w3svc服务停止,导致IIS停止。需要手工将IIS重新启动。
为了使PHPStudy不干扰系统自带的IIS,我们可以在PHPStudy安装并配置好后通过命令行启动nginx,方法如下:
顺便解决php-cgi崩溃自动恢复的问题,先下载xxfpm,
xxfpm下载网址:外链网址已屏蔽github.com/78/xxfpm
放到D:\phpStudy\PHPTutorial\xxfpm目录下,
建立批处理,内容如下:
D:
CD D:\phpStudy\PHPTutorial\nginx
D:\phpStudy\PHPTutorial\nginx\nginx.exe -s stop
start D:\phpStudy\PHPTutorial\nginx\nginx.exe -c D:\phpStudy\PHPTutorial\nginx\conf\nginx.conf
D:\phpStudy\PHPTutorial\xxfpm\xxfpm.exe "D:\phpStudy\PHPTutorial\php\php-5.4.45-nts\php-cgi.exe -c D:\phpStudy\PHPTutorial\php\php-5.4.45-nts\php.ini" -n 5 -i 127.0.0.1 -p 9000
开机后自动运行该批处理即可。