Win32Service 1.0.0 is available

Par @jbnahan69
Win32Service Logo
Win32Service Logo
Attention, cet article est ancien. Les informations ou instructions qu'il contient peuvent ne plus fonctionner.

After the last 1.0.0Alpha2 version, the new version 1.0.0 of Win32Service extension for PHP is available.

Download the new version




Win32Service is a PHP extension. Following the planned change for Win32Service, the version 0.4.x is for PHP7 and the version 1.0.x is for PHP8. This extension provides a simple way to run your PHP script like a service into the Windows Service Manager. Win32Service is same as supervisorD or SystemD for Linux.

The PHP documentation for win32service is up to date.

The v1.0.0 change log

  • Add Win32ServiceException (extends Exception)
  • The return value is no longer false when call method with wrong parameters
    • win32_start_service_ctrl_dispatcher
    • win32_set_service_exit_mode
    • win32_set_service_exit_code
    • win32_set_service_status
    • win32_create_service
    • win32_delete_service
    • win32_get_last_control_message
    • win32_query_service_status
    • win32_start_service
    • win32_stop_service
    • win32_pause_service
    • win32_continue_service
    • win32_send_custom_control
  • Add check in array information provided to win32_create_service. On error, this method throw a ValueError.
  • For function win32_send_custom_control, the PHP error The control argument value is not between 128 and 255. is now throw on ValueError.
  • For all function needed the service name, a ValueError is throw if the string is empty.
  • The PHP Error This function work only when using the CLI SAPI and called into the service code. has been converted to Win32ServiceException for this method
    • win32_start_service_ctrl_dispatcher
    • win32_set_service_exit_mode
    • win32_set_service_exit_code
    • win32_set_service_status
    • win32_get_last_control_message
  • The PHP Warning Service ctrl dispatcher already running has been converted to Win32ServiceException.
    This exception is throw if function win32_start_service_ctrl_dispatcher is called when the control dispatcher is already started.
  • The PHP Warning Failed to start dispatcher thread has been converted to Win32ServiceException.

Edit on December 1, 2020 : I have updated this blog post to add download pre-built DLL links.

More blogpost about Win32Service

Author avatar
Jean-Baptiste Nahan

Consultant Expert Web, j'aide les entreprises ayant des difficultés avec leur projet Web (PHP, Symfony, Sylius).

@jbnahan69 | Macintoshplus | Linkedin | JB Dev Labs