php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
20 - 10 = ?
Subscribe to this entry?

 
 [2011-05-18 14:37 UTC] matt at wootkit dot com
Description:
------------
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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.

See 
http://svn.php.net/viewvc/pecl/win32service/trunk/win32servi
ce.c?r1=304487&r2=304565

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: Thu Apr 18 14:01:31 2024 UTC