I recently created a win32 service using win32_create_service PECL function call. The service shows up in the services manager based on the display name. However, it's mode seems to be set to AutoStart and when I then make a win32_start_service call I get a win32 error #1053 (The service did not respond to the start or control request in a timely fashion.). I cannot seem to start the service using the services manager either. The script I am running as the service (a php command line script) is a very simple test script. Any thoughts?

Many thanks, Greg

Code:

$CreateError=win32_create_service(array(
'service' => 'JobController',
'display' => 'JobController',
'path' => 'c:\php\php.exe',
'params' => 'c:\php\scripts\Hi.php',
//'load_order' => '',
//'svc_type' => 'WIN32_SERVICE_WIN32_OWN_PROCESS',
//'start_type' => WIN32_SERVICE_AUTO_START
));

// WIN32_SERVICE_DEMAND_START; WIN32_SERVICE_ACCEPT_STOP

echo("Create Error = ".$CreateError."\n");

$StartError=win32_start_service("JobController");
echo("Start Error = ".$StartError."\n");

    Write a Reply...