PHP Internals folks--

My name is Eric Stenson, and I'm a developer at Microsoft working on IIS.
I've been given the task of upgrading our php_wincache extension to work 
on PHP5.4, and I've run into a problem.

The problem I'm running into is the php_cgi!main() on PHP5.4 has changed
behavior.  The php_cgi!main() function is seeing us return a ZEND_HANDLE_STREAM,
and it's assuming that the zend_file_handle.handle.stream.handle (void *)
is a (php_stream*), when in fact it's php_wincache's (fcache_handle *).
It then attempts to access the php_stream.ops (a v-table-ish struct), which
is not in the fcache_handle, and it jumps off into an invalid address and
promptly AV's.

I'm trying to understand why our php_wincache!fcache_useval() thinks it's
okay to set zend_file_handle.handle.stream.handle to (fcache_handle *).
I'm having trouble understanding what the responsibilities are of a PHP
extension that extends the file system as php_wincache does.  Could you
point me at any developer documents for PHP extension developers that explains
what php_wincache *should* be doing?

I'm very much a novice at PHP code, or writing a PHP extension, so I feel
like I'm flailing around without understanding what PHP extensions are 
supposed to do.  Any pointers, guidance, and architecture advice would be
massively helpful!

Thank you!
          --E.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to