|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59775 base_priority has no effect
Submitted: 2011-05-18 15:38 UTC Modified: 2011-05-19 10:23 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:
Solve the problem:
48 - 21 = ?
Subscribe to this entry?

 [2011-05-18 15:38 UTC] matt at wootkit dot com
When setting the base_priority parameter in win32_create_service it doesn't appear to have any visible effect on the service when it is run.  I'm trying to run the service in above normal priority, but when setting the base_priority to WIN32_ABOVE_NORMAL_PRIORITY_CLASS the service still runs at normal priority, as seen in the task manager.

Also, when setting the base_priority to WIN32_ABOVE_NORMAL_PRIORITY_CLASS I receive this notice:
Notice:  Use of undefined constant WIN32_ABOVE_NORMAL_PRIORITY_CLASS - assumed 'WIN32_ABOVE_NORMAL_PRIORITY_CLASS' in C:\test.php on line 41.

Changing WIN32_ABOVE_NORMAL_PRIORITY_CLASS to 32768 has no effect on the above bug report.

Reproduce code:
$status = win32_create_service( array(
'service'	=> 'testservice',
'display'	=> 'testservice',
'params'	=> '"C:\\test.php"',
'path'		=> 'C:\\php_net\\php.exe',
'base_priority'	=> 32768,
) ); 

Expected result:
I expect the service, when started, to show it as running in Above Normal priority when viewed through the task manager.

Actual result:
The service, when viewed through the task manager, is running in Normal priority.  Any processes I spawn from the test.php script also run under Normal priority.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-19 05:49 UTC] RQuadling at GMail dot com
See my comments on your other bug reports.

You are running an old version of the extension.

You can get the released source at
 [2011-05-19 10:23 UTC] RQuadling at GMail dot com
Personal build supplied.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 02:05:54 2022 UTC