Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29524 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22811 invoked by uid 1010); 18 May 2007 18:23:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 22796 invoked from network); 18 May 2007 18:23:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2007 18:23:39 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:62259] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/35-08281-92FED464 for ; Fri, 18 May 2007 14:23:39 -0400 Received: from [127.0.0.1] ([192.168.16.109]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 18 May 2007 11:23:35 -0700 Message-ID: <464DEF23.3080503@zend.com> Date: Fri, 18 May 2007 11:23:31 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: php-dev References: <464DCB8C.90803@chiaraquartet.net> In-Reply-To: <464DCB8C.90803@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 May 2007 18:23:35.0117 (UTC) FILETIME=[A590C7D0:01C79979] Subject: Re: [PHP-DEV] potential solution to user streams + allow_url_include=off From: stas@zend.com (Stanislav Malyshev) I think the problem could be solved this way: 0. allow_url_include and allow_url_fopen renamed to allow_remote_include and allow_remote_fopen (not really necessary, just much cleaner, if you don't like it, ignore it for now). 1. By default, allow_remote_inclue=0, allow_remote_fopen=1 2. Stream can be of three types - remote, local and user/local. 3. User streams can be declared when registered as either remote or user/local, remote being the default. 4. When operation on user/local stream is run, allow_remote_fopen is disabled if allow_remote_include was disabled. Thus, if somebody doesn't mark the stream local, it's remote and behaves just like http://. If it is marked as local, it can be used in includes under allow_remote_include=0, however it could not do things like: function stream_open($path, $mode, $options, &$opened_path) { $this->file = fopen($path); } and thus make the local include work with remote files. This would require following changes: 1. Adding optional parameter to stream registration functions. 2. Some tweaking in user streams module to toggle allow_remote_fopen for user/local streams. What do you think? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/