I am trying to start PHP as a service, I run this command:
C:\Windows\system32>sc create PHPSERVER binpath= "C:\php\php-cgi.exe -b 127.0.0.1:9000" start= auto
[SC] CreateService SUCCESS
But the problem I am having, is when I open the services manager, and try to start the service I get this error:
Windows could not start the PHPSERVER service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.
Is there any way I can fix this, so it does work?
Best Answer
Download the service wrapper
Copy
service.exe
to yourwindows directory
.Location: C:\windows\
Open
command prompt
Enter the following command
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:
OR
GUI: