|
Posted by Daniel on 11/10/89 11:30
Does anybody have any practical experience at running PHP scripts as a
Windows service?
I've followed the instructions at
http://www.php.net/manual/en/ref.win32service.php and have downloaded
the php_win32service.dll file and placed it in my extensions directory,
added the line "extension=php_win32service.dll" to my PHP.ini file,
restarted IIS, and when I run phpinfo() it shows as being enabled. Yet
anytime I attempt to create a service all I get back is the number "5".
Platform: Dell Optiplex GX270, Windows XP Pro w/SP2, IIS, PHP 5.0.5
running as ISAPI, Zend Optimizer v2.5.10.
List of loaded extensions:
[0] => bcmath
[1] => calendar
[2] => com_dotnet
[3] => ctype
[4] => ftp
[5] => iconv
[6] => odbc
[7] => pcre
[8] => session
[9] => SPL
[10] => SQLite
[11] => standard
[12] => tokenizer
[13] => zlib
[14] => libxml
[15] => dom
[16] => SimpleXML
[17] => wddx
[18] => xml
[19] => ISAPI
[20] => mcrypt
[21] => mssql
[22] => mysql
[23] => xsl
[24] => win32service
[25] => Zend Optimizer
This is the code I'm using to try and create the service.
---begin-code----
<?php
$details['service']='phpmaintenance';
$details['display']='PHP Maintenance';
$details['params']='C:\\Inetpub\\wwwroot\\maintenance\\php_maintenance.php
run';
$details['start_type']="WIN32_SERVICE_AUTO_START";
$x = win32_create_service($details);
echo $x;
?>
---end-code----
No errors or warning are generated.
I'm assuming this should put a service on the list of services when
viewed from the mmc console, but nothing is showing up. I checked
current tasks, nothing matches. I've tried starting it from a command
line as well as via a web browser, yet nothing seems to work.
Anybody have any ideas ?
Daniel
Navigation:
[Reply to this message]
|