Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58968 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72184 invoked from network); 15 Mar 2012 18:56:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2012 18:56:24 -0000 Authentication-Results: pb1.pair.com header.from=ericsten@microsoft.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ericsten@microsoft.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain microsoft.com designates 216.32.180.12 as permitted sender) X-PHP-List-Original-Sender: ericsten@microsoft.com X-Host-Fingerprint: 216.32.180.12 va3ehsobe002.messaging.microsoft.com Received: from [216.32.180.12] ([216.32.180.12:9430] helo=va3outboundpool.messaging.microsoft.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/3C-16214-55B326F4 for ; Thu, 15 Mar 2012 13:56:23 -0500 Received: from mail126-va3-R.bigfish.com (10.7.14.248) by VA3EHSOBE003.bigfish.com (10.7.40.23) with Microsoft SMTP Server id 14.1.225.23; Thu, 15 Mar 2012 18:56:20 +0000 Received: from mail126-va3 (localhost [127.0.0.1]) by mail126-va3-R.bigfish.com (Postfix) with ESMTP id 299E7A0611 for ; Thu, 15 Mar 2012 18:56:20 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzzz2fh2a8h668h839hd25h) X-Forefront-Antispam-Report: CIP:131.107.125.8;KIP:(null);UIP:(null);IPV:NLI;H:TK5EX14MLTC102.redmond.corp.microsoft.com;RD:none;EFVD:NLI Received-SPF: pass (mail126-va3: domain of microsoft.com designates 131.107.125.8 as permitted sender) client-ip=131.107.125.8; envelope-from=ericsten@microsoft.com; helo=TK5EX14MLTC102.redmond.corp.microsoft.com ;icrosoft.com ; Received: from mail126-va3 (localhost.localdomain [127.0.0.1]) by mail126-va3 (MessageSwitch) id 133183777718055_29860; Thu, 15 Mar 2012 18:56:17 +0000 (UTC) Received: from VA3EHSMHS016.bigfish.com (unknown [10.7.14.235]) by mail126-va3.bigfish.com (Postfix) with ESMTP id F3A1F1A0265 for ; Thu, 15 Mar 2012 18:56:16 +0000 (UTC) Received: from TK5EX14MLTC102.redmond.corp.microsoft.com (131.107.125.8) by VA3EHSMHS016.bigfish.com (10.7.99.26) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 15 Mar 2012 18:56:16 +0000 Received: from TK5EX14MBXC296.redmond.corp.microsoft.com ([169.254.2.232]) by TK5EX14MLTC102.redmond.corp.microsoft.com ([157.54.79.180]) with mapi id 14.02.0283.004; Thu, 15 Mar 2012 18:56:11 +0000 To: "internals@lists.php.net" Thread-Topic: Q: ZEND_HANDLE_STREAM and wincache extension on PHP 5.4 Thread-Index: Ac0C3UmP9w0FG/DWQ/Kd799hDV9e3A== Date: Thu, 15 Mar 2012 18:56:11 +0000 Message-ID: <3ADF645454450443973DDB04FC00A0E525885F35@TK5EX14MBXC296.redmond.corp.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.54.51.71] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com Subject: Q: ZEND_HANDLE_STREAM and wincache extension on PHP 5.4 From: ericsten@microsoft.com (Eric Stenson) 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=20 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.=A0 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.=A0 Could you point me at any developer documents for PHP extension developers that expla= ins 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=20 supposed to do.=A0 Any pointers, guidance, and architecture advice would be massively helpful! Thank you! =A0=A0=A0=A0=A0=A0=A0=A0=A0 --E.