Hello, Everyone:
This is a newbie's problem. If you could bear my words of a novice, please
read on:
I'm currently writing a extension for PHP 5 as php5_module for Apache 2 with
winnt MPM
(and/or as an ISAPI module for IIS 5/6) on Windows 200x server. So this
extension must be
multithread-safe at least. Also it needs to read and write a lots of files
which are stored on
other file servers and shared among other external processes. So a
file-locking is a must,
with thread synchronization in place. I have searched many web pages,
documents and
source codes but still could not find the answers for the following:
1) Are there any function calls which could provide multithread-safe and
multithread-aware
file-locking on Windows 200x in the various API's of PHP 5?
2) Do php_stream_supports_lock and php_stream_lock functions work on Windows
200x ?
If so, in what combination of type/server of PHP 5 is used? CGI, FastCGI or
Module,
with Apache 1.x or 2.x or IIS 5 or 6 or other web server?
3) Is a Resource type zval and/or the zend_rsrc_list_entry it references to
and/or the resource list
includes that entry, default to be shared among the threads or to reside in
individual TLS or to
reside in individual stack, on Windows 200x ?
3a) Dose TSRM have anything to do with Resoucre at all, though the 'R'
letter in TSRM also means
Resource ?
4) If you have tackled or are tackling similar kind of problem, would you
mind to share the experience ?
Or provide other possible solution that may suggest using different OS,
different version of PHP or
different kind of web server ?
Many thanks to people who read or kindly response.
This is a newbie's problem. If you could bear my words of a novice, please
read on:
I'm currently writing a extension for PHP 5 as php5_module for Apache 2 with
winnt MPM
(and/or as an ISAPI module for IIS 5/6) on Windows 200x server. So this
extension must be
multithread-safe at least. Also it needs to read and write a lots of files
which are stored on
other file servers and shared among other external processes. So a
file-locking is a must,
with thread synchronization in place. I have searched many web pages,
documents and
source codes but still could not find the answers for the following:
1) Are there any function calls which could provide multithread-safe and
multithread-aware
file-locking on Windows 200x in the various API's of PHP 5?
2) Do php_stream_supports_lock and php_stream_lock functions work on Windows
200x ?
If so, in what combination of type/server of PHP 5 is used? CGI, FastCGI or
Module,
with Apache 1.x or 2.x or IIS 5 or 6 or other web server?
3) Is a Resource type zval and/or the zend_rsrc_list_entry it references to
and/or the resource list
includes that entry, default to be shared among the threads or to reside in
individual TLS or to
reside in individual stack, on Windows 200x ?
3a) Dose TSRM have anything to do with Resoucre at all, though the 'R'
letter in TSRM also means
Resource ?
4) If you have tackled or are tackling similar kind of problem, would you
mind to share the experience ?
Or provide other possible solution that may suggest using different OS,
different version of PHP or
different kind of web server ?
Many thanks to people who read or kindly response.