Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80358 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49970 invoked from network); 11 Jan 2015 07:07:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2015 07:07:32 -0000 Authentication-Results: pb1.pair.com header.from=francois@tekwire.net; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=francois@tekwire.net; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain tekwire.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@tekwire.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:4976] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/AF-48183-23122B45 for ; Sun, 11 Jan 2015 02:07:32 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id 9DC694B01D6; Sun, 11 Jan 2015 08:05:21 +0100 (CET) Reply-To: To: "'Pierre Joye'" Cc: "'Dmitry Stogov'" , "'Sara Golemon'" , "'Laruence'" , "'Derick Rethans'" , "'PHP internals'" , "'Benjamin Eberlei'" References: <001501d02ccc$574a6bf0$05df43d0$@tekwire.net> <000a01d02cf8$ab090130$011b0390$@tekwire.net> <003c01d02d58$731d0cc0$59572640$@tekwire.net> In-Reply-To: Date: Sun, 11 Jan 2015 08:07:20 +0100 Message-ID: <004e01d02d6d$3e745180$bb5cf480$@tekwire.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKBrOMj1TuM8+kkOgWpn3PeY833kwH7Ko95Akxyc6oB03YOjgM12LP/ApBySSkBp3nUWAH9oRUdmttFEvA= Content-Language: fr X-Antivirus: avast! (VPS 150110-2, 10/01/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] [RFC] Extension Prepend Files From: francois@tekwire.net (=?UTF-8?Q?Fran=C3=A7ois_Laupretre?=) De : Pierre Joye [mailto:pierre.php@gmail.com]=20 > Say we do support builtin scripts, an opcache will simply load them on = minit or on the first request and flag them as=20 > permanent. Yes, it means we need to change opcache but could be way = easier than trying to hack the engine to support=20 > persistent Opcodes without ending with ... an opcache. OK. Agree. I just didn't understand how it was possible without any = change to the cache code. Personnally, if I implemented this, I would distribute a virtual file = tree through a stream wrapper. The stream wrapper would be the same for = all 'client' extensions. The fact to emulate a file tree would allow PHP = scripts to reference each other using a path similar to what we do in = packages : (dirname(__FILE__).'/relative/path'). We just need the stream = wrapper to emulate '.' and '..' and the whole range of relative paths is = available. This way, the script executes in an environment as familiar = as possible. To avoid conflicts, each extension would have a separate = root dir, something like ':///'. Off topic: I'd like to write a PHP7 RFC to extend the file system = features whose behavior remains different for plain files and for stream = wrappers. As most RFCs I write these days, this is an old subject but it = was refused for security reasons, as there was no way to distinguish a = 'remote' stream wrapper from a 'local' one. Now, the is_url flag allows = to restrict dangerous features, like include_path or globbing, to = 'local' wrappers, and some of these wrappers desperately need these = features (primarily phar developers and me, actually :). If you find it = crazy, please tell me before I write something more elaborate. Thanks. Fran=C3=A7ois