|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59773 Delayed start doesn't function
Submitted: 2011-05-18 14:37 UTC Modified: 2011-05-19 10:22 UTC
From: matt at wootkit dot com Assigned: rquadling (profile)
Status: Not a bug Package: win32service (PECL)
PHP Version: 5.3.5 OS: Windows Server 2008 R2 Standard
Private report: No CVE-ID: None
 [2011-05-18 14:37 UTC] matt at wootkit dot com
When creating a service I want it to start delayed.  However, when setting the delayed_start parameter of the win32_create_service function it doesn't have any effect.

Reproduce code:
$status = win32_create_service( array(
'service'	=> 'testservice',
'display'	=> 'testservice',
'params'	=> '"C:\\test.php"',
'path'		=> 'C:\\php\\php.exe',
'auto_start'	=> WIN32_SERVICE_AUTO_START,
'delayed_start'	=> TRUE,
) );

Expected result:
I expected the service to be created and the start type to be: Automatic (Delayed Start).

Actual result:
The service was created, however the startup type is set to "Automatic".  Looking at the registry it appears that the 'DelayedAutostart' REG_DWORD value was not created.  It should have been created and set to 1.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-18 14:40 UTC] matt at wootkit dot com
In addition to the above bug report, I also receive this warning when using the WIN32_SERVICE_AUTO_START:

Use of undefined constant WIN32_SERVICE_AUTO_START - assumed 'WIN32_SERVICE_AUTO_START' in test.php on line 41

This constant should be defined in the win32service.dll right?  Even if I substitute 2 in for the constant this bug still occurs.
 [2011-05-19 05:46 UTC] RQuadling at GMail dot com
The exposure of WIN32_SERVICE_AUTO_START was one of the 
first changes I made to the extension when I took it on.


You are running an old version of the extension.
 [2011-05-19 10:22 UTC] RQuadling at GMail dot com
Personal build supplied.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 05:01:29 2024 UTC