php-cgi.exe as a windows service

回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

php-cgi.exe as a windows service

文章 yehlu »

http://superuser.com/questions/628176/p ... ws-service

Download the service wrapper

Copy service.exe to your windows directory.

Location: C:\windows\

Open command prompt

Enter the following command

sc create PHP binPath= "service.exe \"C:\php\php-cgi.exe -b 127.0.0.1:9000 -c C:\php\php.ini"" type= own start= auto error= ignore DisplayName= PHP
Note: Adjust paths for both "php-cgi.exe" and "php.ini" according to yours.

Once you have installed the service, you can start it via:

Command line:

sc start PHP // to start PHP service.

sc delete PHP // to delete PHP service

sc stop PHP // to stop PHP service
OR

GUI:

type "services.msc" at run then find "PHP" from the list and right click on it and select Start.
回覆文章

回到「PHP」