diff --git a/reference/win32service/functions/win32-create-service.xml b/reference/win32service/functions/win32-create-service.xml
index 1775b8ca5b..868927317f 100644
--- a/reference/win32service/functions/win32-create-service.xml
+++ b/reference/win32service/functions/win32-create-service.xml
@@ -14,7 +14,7 @@
stringmachine
- Attempts to add a service into the SCM database. Administrative
+ Attempts to add a service into the SCM database. Administrative
privileges are required for this to succeed.
@@ -168,6 +168,111 @@
+
+ dependencies
+
+
+ To define the dependencies for your service, it may be necessary to set
+ this parameter to the list of the services names in an array.
+
+
+
+
+ recovery_delay
+
+
+ This parameter defines the delay between the fail and the execution
+ of recovery action. The value is in milliseconds.
+
+
+ The default value is 60000.
+
+
+
+
+ recovery_action_1
+
+
+ The action will be executed on first failure. The default value is
+ WIN32_SC_ACTION_NONE.
+
+
+ The recovery_action_1 can be set to one of the
+ constants defined in
+ Win32 Recovery action.
+
+
+
+
+ recovery_action_2
+
+
+ The action will be executed on second failure. The default value is
+ WIN32_SC_ACTION_NONE.
+
+
+ The recovery_action_2 can be set to one of the
+ constants defined in
+ Win32 Recovery action.
+
+
+
+
+ recovery_action_3
+
+
+ The action will be executed on next failures. The default value is
+ WIN32_SC_ACTION_NONE.
+
+
+ The recovery_action_3 can be set to one of the
+ constants defined in
+ Win32 Recovery action.
+
+
+
+
+ recovery_reset_period
+
+
+ The failure count will be reset after the delay defined in the parameter. The delay is expirement in seconds.
+
+
+ The default value is 86400.
+
+
+
+
+ recovery_enabled
+
+
+ Set this parameter at &true; to enable the recovery settings, &false;
+ to disable.
+
+
+ The default value is &false;
+
+
+
+
+ recovery_reboot_msg
+
+
+ Set this parameter to define the message saved into the Windows Event
+ Log before the reboot. Used only if one action is set to
+ WIN32_SC_ACTION_REBOOT.
+
+
+
+
+ recovery_command
+
+
+ Set this parameter to define the command executed when one action is defined on
+ WIN32_SC_ACTION_RUN_COMMAND.
+
+
+
@@ -204,10 +309,61 @@
'dummyphp', # the name of your service
- 'display' => 'sample dummy PHP service', # short description
- 'description' => 'This is a dummy Windows service created using PHP.', # long description
- 'params' => '"' . __FILE__ . '" run', # path to the script and parameters
+ 'service' => 'dummyphp', // the name of your service
+ 'display' => 'sample dummy PHP service', // short description
+ 'description' => 'This is a dummy Windows service created using PHP.', // long description
+ 'params' => '"' . __FILE__ . '" run', // path to the script and parameters
+));
+debug_zval_dump($x);
+?>
+]]>
+
+
+
+
+
+ A win32_create_service example with dependencies
+
+ Create a service with the short name 'dummyphp' and dependencies.
+
+
+ 'dummyphp', // the name of your service
+ 'display' => 'sample dummy PHP service', // short description
+ 'description' => 'This is a dummy Windows service created using PHP.', // long description
+ 'params' => '"' . __FILE__ . '" run', // path to the script and parameters
+ 'dependencies' => array("Netman"), // The list of the dependencies
+));
+debug_zval_dump($x);
+?>
+]]>
+
+
+
+
+
+ A win32_create_service example with recovery
+
+ Create a service with the short name 'dummyphp' and recovery settings.
+
+
+ 'dummyphp', // the name of your service
+ 'display' => 'sample dummy PHP service', // short description
+ 'description' => 'This is a dummy Windows service created using PHP.', // long description
+ 'params' => '"' . __FILE__ . '" run', // path to the script and parameters
+ 'recovery_delay' => 120000, // Recovery action is executed after 2 minutes
+ 'recovery_action_1' => WIN32_SC_ACTION_RESTART, // On first failure, restart the service
+ 'recovery_action_2' => WIN32_SC_ACTION_RUN_COMMAND, // On second failure, execute the commmand
+ 'recovery_action_3' => WIN32_SC_ACTION_NONE, // On other failure, do nothing
+ 'recovery_reset_period' => 86400, // Reset the fail counter after 1 day
+ 'recovery_enabled' => true, // Enable the recovery parameter
+ 'recovery_reboot_msg' => null, // Do not define a reboot message, it's not needed here
+ 'recovery_command' => "c:\clean-service.bat", // When the action is WIN32_SC_ACTION_RUN_COMMAND, execute this command
));
debug_zval_dump($x);
?>
@@ -217,12 +373,37 @@ debug_zval_dump($x);
+
+
+&reftitle.changelog;
+
+
+
+
+
+&Version;
+&Description;
+
+
+
+
+0.4.0
+
+ The dependencies, recovery_delay,recovery_action_1, recovery_action_2, recovery_action_3, recovery_reset_period, recovery_enabled, recovery_reboot_msg and recovery_command parameters have been added.
+
+
+
+
+
+
+
&reftitle.seealso;
win32_delete_serviceWin32 Base Priority Classes
+ Win32 Recovery actionWin32 Error Codes
diff --git a/reference/win32service/functions/win32-query-service-status.xml b/reference/win32service/functions/win32-query-service-status.xml
index 1b6b0b6418..9a328db67e 100644
--- a/reference/win32service/functions/win32-query-service-status.xml
+++ b/reference/win32service/functions/win32-query-service-status.xml
@@ -83,7 +83,7 @@
WIN32_ERROR_SERVICE_SPECIFIC_ERROR
if the exit mode is not gracefuly. See
Win32Service error codes and
- win32_set_service_exit_mode
+ win32_set_service_exit_mode
@@ -93,7 +93,7 @@
If the service exited with an error condition, the service specific
code that is logged in the event log is visible here. This value is equal
- to the value defined by win32_set_service_exit_code
+ to the value defined by win32_set_service_exit_code
@@ -122,7 +122,7 @@
ProcessId
- The Windows process identifier. If 0, the process is not running.
+ The Windows process identifier. If 0, the process is not running.