php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77834 Service running PHP script fails to start
Submitted: 2019-04-02 21:14 UTC Modified: 2019-10-13 06:40 UTC
From: aboeger at gmail dot com Assigned: jbnahan (profile)
Status: Closed Package: win32service (PECL)
PHP Version: 7.1.27 OS: Win Server 2012 R2
Private report: No CVE-ID: None
 [2019-04-02 21:14 UTC] aboeger at gmail dot com
Description:
------------
PECL Win32 service DLL 0.4.0
Non thread safe, 64bit
PHP Version	7.1.7
PEAR - not installed

I'm trying to use PECL's create win32 service function to run a PHP script as a service. The service gets created and from what I can see it's executing the PHP script...  but -- windows is timing out the attempt to start the service.   >>>   A timeout was reached (30000 milliseconds) while waiting for the APMT_PHP_Test2 service to connect. <<<     This particular script does not "finish"; it starts an endless while() loop that listens for incoming socket connections.  Is that why I'm having a problem, because the service/windows is expecting a conclusion of sorts from the script?    Halp!


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-15 19:21 UTC] jbnahan@php.net
Hi,

Do you have used this sample to understand how the service run ?
https://github.com/win32service/win32service/blob/v0.4.x/examples/service.php

This example split more the scope of all functions available in this extension.
https://github.com/win32service/win32service/tree/v0.4.x/examples/object_exemple

Otherwise, you can use the library 
https://github.com/win32service/service-library

Or if you have a Symfony project this Bundle :
https://github.com/win32service/Win32ServiceBundle
 [2019-07-15 19:22 UTC] jbnahan@php.net
-Assigned To: +Assigned To: jbnahan
 [2019-10-13 06:40 UTC] jbnahan@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC