|
Posted by Daniel on 09/29/70 11:30
Full path (copied and pasted from Windows Explorer) is
"C:\Inetpub\wwwroot\maintenance\php_maintenance.php" (looks good from
here.)
This is the "php_maintenance.php" file.
---begin-code----
<?php
if ($argv[1] == 'run') {
win32_start_service_ctrl_dispatcher('phpmaintenance');
$dataoutput="Hello World\r\n";
while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message())
{
$filename="C:\\inetpub\\Test_".date("Ymd_His").".log";
if ($handle = fopen($filename, 'a')) {
fwrite($handle, $dataoutput);
fclose($handle);
}
sleep(3);
}
}
?>
---end-code----
The idea for this piece of test code is to write a new text file
containing "Hello World" every 3 seconds to C:\Inetpub.
I know PHP has write access to that folder as my error handler puts
it's logs there. I figured if it worked and I saw the new files I would
move forward building a new maintenance system, but it's not even doing
that.
It looks simple enough and I might be missing something simple, I just
can't figure out what. I checked security on the php_win32service.dll
file and it does have read, write, and execute permissions for both the
IUSR and IWAM accounts.
The only new thing that has been added lately was the Zend Optimizer. I
may try uninstalling it and see what happens, otherwise I'm at a loss
to figure out why it will not work.
PS:In answer to the 2nd message, if you check this page (PECL library),
http://snaps.php.net/win32/ it looks like there is not a version of the
dll available under PHP 4.x.x. Somebody may correct me later, and
that's Ok, but I don't see one for PHP 4.x.x.
Thank you
Daniel
Navigation:
[Reply to this message]
|